- Timestamp:
- 05/09/11 14:12:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r6110 r6168 171 171 public void StopJob(Guid jobId) { 172 172 trans.UseTransaction(() => { 173 //dao.UpdateJobState(jobId, JobState.Aborted, null, auth.UserId, string.Empty);174 173 var job = dao.GetJob(jobId); 175 job.Command = Command.Stop; 176 dao.UpdateJob(job); 174 if (job.State == JobState.Calculating || job.State == JobState.Transferring) { 175 job.Command = Command.Stop; 176 dao.UpdateJob(job); 177 } else { 178 if (job.State != JobState.Aborted && job.State != JobState.Finished && job.State != JobState.Failed) { 179 job = UpdateJobState(jobId, JobState.Aborted, null, null, string.Empty); 180 } 181 } 177 182 }); 178 183 } … … 183 188 public void PauseJob(Guid jobId) { 184 189 trans.UseTransaction(() => { 185 //dao.UpdateJobState(jobId, JobState.Paused, null, auth.UserId, string.Empty);186 190 var job = dao.GetJob(jobId); 187 job.Command = Command.Pause; 188 dao.UpdateJob(job); 191 if (job.State == JobState.Calculating || job.State == JobState.Transferring) { 192 job.Command = Command.Pause; 193 dao.UpdateJob(job); 194 } else { 195 job = UpdateJobState(jobId, JobState.Paused, null, null, string.Empty); 196 } 189 197 }); 190 198 }
Note: See TracChangeset
for help on using the changeset viewer.