Changeset 6721 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs
- Timestamp:
- 09/08/11 13:41:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.3/Executor.cs
r6464 r6721 100 100 public void Pause() { 101 101 IsPausing = true; 102 // wait until job is started. if this does not happen, the Jobis null an we give up102 // wait until job is started. if this does not happen, the Task is null an we give up 103 103 jobStartedSem.WaitOne(Settings.Default.ExecutorSemTimeouts); 104 104 if (job == null) { 105 CurrentException = new Exception("Pausing job " + this.JobId + ": Jobis null");105 CurrentException = new Exception("Pausing job " + this.JobId + ": Task is null"); 106 106 executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured); 107 107 return; … … 123 123 public void Stop() { 124 124 IsStopping = true; 125 // wait until job is started. if this does not happen, the Jobis null an we give up125 // wait until job is started. if this does not happen, the Task is null an we give up 126 126 jobStartedSem.WaitOne(Settings.Default.ExecutorSemTimeouts); 127 127 if (job == null) { 128 CurrentException = new Exception("Stopping job " + this.JobId + ": Jobis null");128 CurrentException = new Exception("Stopping job " + this.JobId + ": Task is null"); 129 129 executorQueue.AddMessage(ExecutorMessageType.ExceptionOccured); 130 130 } … … 157 157 } 158 158 159 #region JobEvents159 #region Task Events 160 160 private void Job_JobFailed(object sender, EventArgs e) { 161 161 IsStopping = true; … … 185 185 #endregion 186 186 187 public JobData GetJobData() {187 public TaskData GetJobData() { 188 188 if (jobDataInvalid) return null; 189 189 190 190 if (job.ExecutionState == ExecutionState.Started) { 191 throw new InvalidStateException(" Jobis still running");191 throw new InvalidStateException("Task is still running"); 192 192 } else { 193 JobData jobData = new JobData();193 TaskData jobData = new TaskData(); 194 194 if (job == null) { 195 195 //send empty job and save exception 196 jobData.Data = PersistenceUtil.Serialize(new JobData());196 jobData.Data = PersistenceUtil.Serialize(new TaskData()); 197 197 if (CurrentException == null) { 198 CurrentException = new Exception(" Jobwith id " + this.JobId + " is null, sending empty job");198 CurrentException = new Exception("Task with id " + this.JobId + " is null, sending empty job"); 199 199 } 200 200 } else { 201 201 jobData.Data = PersistenceUtil.Serialize(job); 202 202 } 203 jobData. JobId = JobId;203 jobData.TaskId = JobId; 204 204 return jobData; 205 205 }
Note: See TracChangeset
for help on using the changeset viewer.