Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11223


Ignore:
Timestamp:
07/24/14 13:13:01 (10 years ago)
Author:
ascheibe
Message:

fixed bugs in statistics generator and updated janitor service config

Location:
branches/HiveStatistics/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.JanitorService/3.3/app.config

    r7189 r11223  
    11<?xml version="1.0"?>
    22<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  
    1212
    1313    private static readonly TimeSpan SmallestTimeSpan = new TimeSpan(0, 5, 0);
     14    private static readonly string UnknownUserName = "Unknown";
    1415
    1516    public void GenerateStatistics() {
     
    7576        select u;
    7677
     78
    7779      var newDimUsers =
    78         from u in newUsers.ToList()
    79         select new DimUser {
    80           UserId = u,
    81           Name = userManager.GetUserById(u).UserName
    82         };
     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     };
    8385
    8486      db.DimUsers.InsertAllOnSubmit(newDimUsers);
     
    100102        select new DimJob {
    101103          JobId = j.JobId,
    102           JobName = j.Name,
     104          JobName = j.Name == null ? string.Empty : j.Name,
    103105          UserId = j.OwnerUserId,
    104           UserName = userManager.GetUserById(j.OwnerUserId).UserName
     106          UserName = userManager.GetUserById(j.OwnerUserId) != null ? userManager.GetUserById(j.OwnerUserId).UserName : UnknownUserName
    105107        };
    106108
     
    255257          TotalTransferTime = stateLogsLinkedList.SumTotalTimeWhere(stateLog => stateLog.Value.State == TaskState.Transferring),
    256258          TaskState = t.Task.State,
    257           Exception = stateLogsLinkedList.First(sl => sl.Exception != null).Exception
     259          Exception = stateLogsLinkedList.FirstOrDefault(sl => sl.Exception != null) == null ? string.Empty : stateLogsLinkedList.FirstOrDefault(sl => sl.Exception != null).Exception
    258260        };
    259261
Note: See TracChangeset for help on using the changeset viewer.