Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/07/11 11:44:15 (14 years ago)
Author:
ascheibe
Message:

#1233

  • added Pause/Stop/Abort mechanisms to the slave
  • added Pause to Jobs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Executor.cs

    r5314 r5450  
    3535    public IJob Job { get; set; }
    3636    private bool wasJobAborted = false;
    37     public Core core { get; set; }
     37    public Core Core { get; set; }
    3838
    3939    private Exception currentException;
     
    8484    }
    8585
    86     public void StartOnlyJob() {
    87       try {
    88         Job.Start();
    89       }
    90       catch (Exception e) {
    91         this.currentException = e;
    92       }
     86    public void Pause() {
     87      Job.Pause();
     88     
    9389    }
    9490
    95     public void Pause() {
    96       Job.Pause();
    97     }
    98 
    99     public void Abort() {
     91    public void Stop() {
    10092      wasJobAborted = true;
    10193      if ((ExecutionState == ExecutionState.Started) || (ExecutionState == ExecutionState.Paused)) {
     
    153145      jdata.JobId = this.JobId;
    154146
    155       core.PauseJob(jdata);
     147      Core.PauseWaitJob(jdata);
    156148    }
    157149
     
    164156      HeuristicLab.Common.EventArgs<Exception> ex = (HeuristicLab.Common.EventArgs<Exception>)e;
    165157      currentException = ex.Value;
    166       core.SendFinishedJob(JobId);
     158      Core.SendFinishedJob(JobId);
    167159    }
    168160
    169161    private void Job_JobStopped(object sender, EventArgs e) {
    170162      if (wasJobAborted) {
    171         core.KillAppDomain(JobId);
     163        Core.KillAppDomain(JobId);
    172164      } else {
    173         core.SendFinishedJob(JobId);
     165        Core.SendFinishedJob(JobId);
    174166      }
    175167    }
Note: See TracChangeset for help on using the changeset viewer.