Changeset 11223
- Timestamp:
- 07/24/14 13:13:01 (10 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.JanitorService/3.3/app.config
r7189 r11223 1 1 <?xml version="1.0"?> 2 2 <configuration> 3 <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> 3 <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup> 4 <connectionStrings> 5 <add name="HeuristicLab.Authentication" connectionString="data source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication"/> 6 <add name="HeuristicLab.Services.Hive.DataAccess.Settings.HeuristicLab_Hive_LinqConnectionString" 7 connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.3;Integrated Security=True;" 8 providerName="System.Data.SqlClient" /> 9 </connectionStrings> 10 <system.web> 11 <authentication mode="Forms" /> 12 <membership defaultProvider="AspNetSqlMembershipProvider"> 13 <providers> 14 <clear /> 15 <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="HeuristicLab.Authentication" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="HeuristicLab.Authentication" /> 16 <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" /> 17 </providers> 18 </membership> 19 <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider"> 20 <providers> 21 <clear /> 22 <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" /> 23 <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" /> 24 </providers> 25 </roleManager> 26 </system.web> 27 </configuration> -
branches/HiveStatistics/sources/HeuristicLab.Services.Hive/3.3/HiveStatisticsGenerator.cs
r11222 r11223 12 12 13 13 private static readonly TimeSpan SmallestTimeSpan = new TimeSpan(0, 5, 0); 14 private static readonly string UnknownUserName = "Unknown"; 14 15 15 16 public void GenerateStatistics() { … … 75 76 select u; 76 77 78 77 79 var newDimUsers = 78 79 80 81 Name = userManager.GetUserById(u).UserName82 80 from u in newUsers.ToList() 81 select new DimUser { 82 UserId = u, 83 Name = userManager.GetUserById(u) != null ? userManager.GetUserById(u).UserName : UnknownUserName 84 }; 83 85 84 86 db.DimUsers.InsertAllOnSubmit(newDimUsers); … … 100 102 select new DimJob { 101 103 JobId = j.JobId, 102 JobName = j.Name ,104 JobName = j.Name == null ? string.Empty : j.Name, 103 105 UserId = j.OwnerUserId, 104 UserName = userManager.GetUserById(j.OwnerUserId) .UserName106 UserName = userManager.GetUserById(j.OwnerUserId) != null ? userManager.GetUserById(j.OwnerUserId).UserName : UnknownUserName 105 107 }; 106 108 … … 255 257 TotalTransferTime = stateLogsLinkedList.SumTotalTimeWhere(stateLog => stateLog.Value.State == TaskState.Transferring), 256 258 TaskState = t.Task.State, 257 Exception = stateLogsLinkedList.First (sl => sl.Exception != null).Exception259 Exception = stateLogsLinkedList.FirstOrDefault(sl => sl.Exception != null) == null ? string.Empty : stateLogsLinkedList.FirstOrDefault(sl => sl.Exception != null).Exception 258 260 }; 259 261
Note: See TracChangeset
for help on using the changeset viewer.