Changeset 4116 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
- Timestamp:
- 07/27/10 18:36:36 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/JobManager.cs
r4107 r4116 66 66 List<JobDto> allJobs = new List<JobDto>(DaoLocator.JobDao.FindAll()); 67 67 foreach (JobDto curJob in allJobs) { 68 if (curJob.State != State. calculating && curJob.State != State.finished) {68 if (curJob.State != State.Calculating && curJob.State != State.Finished) { 69 69 DaoLocator.JobDao.SetJobOffline(curJob); 70 70 } … … 170 170 171 171 if (job != null && job.JobInfo != null) { 172 if (job.JobInfo.State != State. offline) {172 if (job.JobInfo.State != State.Offline) { 173 173 response.Success = false; 174 174 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOBSTATE_MUST_BE_OFFLINE; … … 242 242 243 243 //if it's a snapshot but the result hasn't reached the server yet... 244 if (snapshot && (job.State == State. requestSnapshot || job.State == State.requestSnapshotSent)) {244 if (snapshot && (job.State == State.RequestSnapshot || job.State == State.RequestSnapshotSent)) { 245 245 response.Success = true; 246 246 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE; … … 250 250 251 251 //if it's NOT a snapshot, NEITHER request NOR is it finished 252 if (!requested && !snapshot && job.State != State. finished) {252 if (!requested && !snapshot && job.State != State.Finished) { 253 253 response.Success = true; 254 254 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE; … … 273 273 274 274 JobDto job = DaoLocator.JobDao.FindById(jobId); 275 if (job.State == State. requestSnapshot || job.State == State.requestSnapshotSent) {275 if (job.State == State.RequestSnapshot || job.State == State.RequestSnapshotSent) { 276 276 response.Success = true; 277 277 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_REQUEST_ALLREADY_SET; 278 278 return response; 279 279 } 280 if (job.State != State. calculating) {280 if (job.State != State.Calculating) { 281 281 response.Success = false; 282 282 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED; … … 284 284 } 285 285 // job is in correct state 286 job.State = State. requestSnapshot;286 job.State = State.RequestSnapshot; 287 287 DaoLocator.JobDao.Update(job); 288 288 … … 302 302 return response; // no commit needed 303 303 } 304 if (job.State == State. abort) {304 if (job.State == State.Abort) { 305 305 response.Success = true; 306 306 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_ABORT_REQUEST_ALLREADY_SET; 307 307 return response; // no commit needed 308 308 } 309 if (job.State != State. calculating && job.State != State.requestSnapshot && job.State != State.requestSnapshotSent) {309 if (job.State != State.Calculating && job.State != State.RequestSnapshot && job.State != State.RequestSnapshotSent) { 310 310 response.Success = false; 311 311 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_IS_NOT_BEEING_CALCULATED; … … 313 313 } 314 314 // job is in correct state 315 job.State = State. abort;315 job.State = State.Abort; 316 316 DaoLocator.JobDao.Update(job); 317 317
Note: See TracChangeset
for help on using the changeset viewer.