- Timestamp:
- 04/16/09 17:33:09 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ClientCommunicator.cs
r1530 r1577 240 240 heartbeatLock.ExitWriteLock(); 241 241 242 response.Success = true;243 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_HEARTBEAT_RECEIVED;244 242 // check if client has a free core for a new job 245 243 // if true, ask scheduler for a new job for this client … … 248 246 else 249 247 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.NoMessage)); 248 249 response.Success = true; 250 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_HEARTBEAT_RECEIVED; 250 251 251 252 processJobProcess(hbData, jobAdapter, clientAdapter, response); … … 287 288 response.Success = false; 288 289 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED; 289 } else if (curJob.State == State.finished) { 290 // another client has finished this job allready 291 // the client can abort it 290 } else if (curJob.State == State.abort) { 291 // a request to abort the job has been set 292 292 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 293 293 } else { … … 295 295 curJob.Percentage = jobProgress.Value; 296 296 jobAdapter.Update(curJob); 297 298 if (curJob.State == State.requestSnapshot) { 299 // a request for a snapshot has been set 300 response.ActionRequest.Add(new MessageContainer(MessageContainer.MessageType.RequestSnapshot, curJob.Id)); 301 } 297 302 } 298 303 } … … 301 306 302 307 /// <summary> 303 /// if the client asked to pull a job he calls this method308 /// if the client was told to pull a job he calls this method 304 309 /// the server selects a job and sends it to the client 305 310 /// </summary> … … 348 353 jobAdapter.GetById(jobId); 349 354 355 if (job == null) { 356 response.Success = false; 357 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOB_WITH_THIS_ID; 358 response.JobId = jobId; 359 return response; 360 } 350 361 if (job.Client == null) { 351 362 response.Success = false; 352 363 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED; 364 response.JobId = jobId; 353 365 return response; 354 366 } … … 356 368 response.Success = false; 357 369 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_WRONG_CLIENT_FOR_JOB; 358 return response; 359 } 360 if (job == null) { 361 response.Success = false; 362 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_NO_JOB_WITH_THIS_ID; 370 response.JobId = jobId; 363 371 return response; 364 372 } … … 366 374 response.Success = true; 367 375 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOBRESULT_RECEIVED; 376 response.JobId = jobId; 368 377 return response; 369 378 } … … 371 380 response.Success = false; 372 381 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_WRONG_JOB_STATE; 382 response.JobId = jobId; 373 383 return response; 374 384 }
Note: See TracChangeset
for help on using the changeset viewer.