Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/18/18 15:08:25 (6 years ago)
Author:
jzenisek
Message:

#2839

  • updated Heartbeat processing (regarding: checking against AssignedJobResources and handling of the updated Job deletion routine)
  • updated Job deletion routine(still in progress at GenerateStatistics)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Converter.cs

    r15628 r15630  
    121121        OwnerUserId = source.OwnerUserId,
    122122        DateCreated = source.DateCreated,
    123         ProjectId = source.ProjectId
     123        ProjectId = source.ProjectId,
     124        State = source.State.ToDto()
    124125      };
    125126    }
     
    140141      target.DateCreated = source.DateCreated;
    141142      target.ProjectId = source.ProjectId;
     143      target.State = source.State.ToEntity();
    142144    }
    143145    #endregion
     
    242244    #endregion
    243245
    244     #region State
     246    #region TaskState
    245247    public static DT.TaskState ToDto(this DA.TaskState source) {
    246248      switch (source) {
     
    268270        case DT.TaskState.Waiting: return DA.TaskState.Waiting;
    269271        default: return DA.TaskState.Failed;
     272      }
     273    }
     274    #endregion
     275
     276    #region JobState
     277    public static DT.JobState ToDto(this DA.JobState source) {
     278      switch (source) {
     279        case DA.JobState.Online: return DT.JobState.Online;
     280        case DA.JobState.StatisticsPending: return DT.JobState.StatisticsPending;
     281        case DA.JobState.DeletionPending: return DT.JobState.DeletionPending;
     282        default: return DT.JobState.Online;
     283      }
     284    }
     285
     286    public static DA.JobState ToEntity(this DT.JobState source) {
     287      switch (source) {
     288        case DT.JobState.Online: return DA.JobState.Online;
     289        case DT.JobState.StatisticsPending: return DA.JobState.StatisticsPending;
     290        case DT.JobState.DeletionPending: return DA.JobState.DeletionPending;
     291        default: return DA.JobState.Online;
    270292      }
    271293    }
Note: See TracChangeset for help on using the changeset viewer.