Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 13:41:25 (13 years ago)
Author:
ascheibe
Message:

#1233 Review comments: renamed Job to Task

File:
1 edited

Legend:

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

    r6464 r6721  
    100100    public void Pause() {
    101101      IsPausing = true;
    102       // wait until job is started. if this does not happen, the Job is null an we give up
     102      // wait until job is started. if this does not happen, the Task is null an we give up
    103103      jobStartedSem.WaitOne(Settings.Default.ExecutorSemTimeouts);
    104104      if (job == null) {
    105         CurrentException = new Exception("Pausing job " + this.JobId + ": Job is null");
     105        CurrentException = new Exception("Pausing job " + this.JobId + ": Task is null");
    106106        executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured);
    107107        return;
     
    123123    public void Stop() {
    124124      IsStopping = true;
    125       // wait until job is started. if this does not happen, the Job is null an we give up
     125      // wait until job is started. if this does not happen, the Task is null an we give up
    126126      jobStartedSem.WaitOne(Settings.Default.ExecutorSemTimeouts);
    127127      if (job == null) {
    128         CurrentException = new Exception("Stopping job " + this.JobId + ": Job is null");
     128        CurrentException = new Exception("Stopping job " + this.JobId + ": Task is null");
    129129        executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured);
    130130      }
     
    157157    }
    158158
    159     #region Job Events
     159    #region Task Events
    160160    private void Job_JobFailed(object sender, EventArgs e) {
    161161      IsStopping = true;
     
    185185    #endregion
    186186
    187     public JobData GetJobData() {
     187    public TaskData GetJobData() {
    188188      if (jobDataInvalid) return null;
    189189
    190190      if (job.ExecutionState == ExecutionState.Started) {
    191         throw new InvalidStateException("Job is still running");
     191        throw new InvalidStateException("Task is still running");
    192192      } else {
    193         JobData jobData = new JobData();
     193        TaskData jobData = new TaskData();
    194194        if (job == null) {
    195195          //send empty job and save exception
    196           jobData.Data = PersistenceUtil.Serialize(new JobData());
     196          jobData.Data = PersistenceUtil.Serialize(new TaskData());
    197197          if (CurrentException == null) {
    198             CurrentException = new Exception("Job with id " + this.JobId + " is null, sending empty job");
     198            CurrentException = new Exception("Task with id " + this.JobId + " is null, sending empty job");
    199199          }
    200200        } else {
    201201          jobData.Data = PersistenceUtil.Serialize(job);
    202202        }
    203         jobData.JobId = JobId;
     203        jobData.TaskId = JobId;
    204204        return jobData;
    205205      }
Note: See TracChangeset for help on using the changeset viewer.