- Timestamp:
- 07/18/10 22:16:04 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/sources/HeuristicLab.Hive.Server.Core/3.2/JobManager.cs
r3931 r4042 105 105 ResponseList<JobDto> response = new ResponseList<JobDto>(); 106 106 response.List = new List<JobDto>(DaoLocator.JobDao.FindWithLimitations(jobState, offset, count)); 107 response.Success = true; 107 108 return response; 108 109 } … … 237 238 } 238 239 240 //Requested means: there MUST be a job result which gets sent back 239 241 public ResponseObject<SerializedJob> 240 GetLastSerializedJobResultOf(Guid jobId, bool requested ) {242 GetLastSerializedJobResultOf(Guid jobId, bool requested, bool snapshot) { 241 243 ResponseObject<SerializedJob> response = 242 244 new ResponseObject<SerializedJob>(); 243 245 244 246 JobDto job = DaoLocator.JobDao.FindById(jobId); 245 if (requested && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) { 247 248 //if it's a snapshot but the result hasn't reached the server yet... 249 if (snapshot && (job.State == State.requestSnapshot || job.State == State.requestSnapshotSent)) { 246 250 response.Success = true; 247 251 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE; … … 250 254 } 251 255 256 //if it's NOT a snapshot, NEITHER request NOR is it finished 257 if(!requested && !snapshot && job.State != State.finished) { 258 response.Success = true; 259 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_RESULT_NOT_YET_HERE; 260 261 return response; 262 } 263 264 //every other case - snapshot, job finished or it's requested 252 265 response.Success = true; 253 266 response.StatusMessage = ApplicationConstants.RESPONSE_JOB_JOB_RESULT_SENT; 254 267 response.Obj = new SerializedJob(); 255 268 response.Obj.JobInfo = job; 269 256 270 response.Obj.SerializedJobData = 257 271 DaoLocator.JobDao.GetBinaryJobFile(jobId); 272 258 273 return response; 259 274 }
Note: See TracChangeset
for help on using the changeset viewer.