Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/21/11 17:35:42 (14 years ago)
Author:
cneumuel
Message:

#1233

  • fixed handling of StateLog in DataLayer
  • extended unit tests
  • changed style of service calls to OKB-like style (using delegates)
  • added possibility that parent jobs can be finished immediately when child jobs are finished
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Job.cs

    r5511 r5526  
    3939    [DataMember]
    4040    public DateTime? LastHeartbeat { get; set; }
     41    [DataMember]
     42    public bool IsParentJob { get; set; }
     43    [DataMember]
     44    public bool FinishWhenChildJobsFinished { get; set; }
    4145   
    4246    public Job() {
     
    4953      this.PluginsNeededIds = new List<Guid>(original.PluginsNeededIds);
    5054      this.LastHeartbeat = original.LastHeartbeat;
     55      this.IsParentJob = original.IsParentJob;
     56      this.FinishWhenChildJobsFinished = original.FinishWhenChildJobsFinished;
    5157    }
    5258    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/JobState.cs

    r5511 r5526  
    3333    Waiting,
    3434
    35     /// <summary>
    36     /// The job is set to Finished when all child jobs are Finished.
    37     /// </summary>
    38     FinishOnChildJobsFinished,
     35    ///// <summary>
     36    ///// The job is set to Finished when all child jobs are Finished.
     37    ///// </summary>
     38    //FinishOnChildJobsFinished,
    3939
    40     /// <summary>
    41     /// The job is paused and waits on the server to be sent back to a Slave when all of its child jobs are Finished.
    42     /// </summary>
    43     ResumeOnChildJobsFinished,
     40    ///// <summary>
     41    ///// The job is paused and waits on the server to be sent back to a Slave when all of its child jobs are Finished.
     42    ///// </summary>
     43    //ResumeOnChildJobsFinished,
    4444
    4545    /// <summary>
     
    8181    /// </summary>
    8282    public static bool IsWaiting(this JobState jobState) {
    83       return jobState == JobState.Waiting ||
    84         jobState == JobState.FinishOnChildJobsFinished;
     83      return jobState == JobState.Waiting;
    8584    }
    8685
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/LightweightJob.cs

    r5511 r5526  
    4848
    4949    public LightweightJob(Job job) {
     50      this.Id = job.Id;
    5051      this.ExecutionTime = job.ExecutionTime;
    5152      this.ParentJobId = job.ParentJobId;
    52       this.StateLog = new List<StateLog>();
     53      this.StateLog = new List<StateLog>(job.StateLog);
     54      this.State = job.State;
    5355    }
    5456    protected LightweightJob(LightweightJob original, Cloner cloner)
     
    5759      this.ParentJobId = original.ParentJobId;
    5860      this.StateLog = new List<StateLog>(original.StateLog);
     61      this.State = original.State;
    5962    }
    6063    public override IDeepCloneable Clone(Cloner cloner) {
Note: See TracChangeset for help on using the changeset viewer.