Changeset 5171 for branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs
- Timestamp:
- 12/23/10 14:48:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/SlaveCommunicator.cs
r5153 r5171 74 74 /// <param name="sender"></param> 75 75 /// <param name="e"></param> 76 void lifecycleManager_OnServerHeartbeat(object sender, EventArgs e) { 76 public void lifecycleManager_OnServerHeartbeat(object sender, EventArgs e) { 77 return; 77 78 // this block can conflict with the heartbeats from a slave (which also updates the slave-records) 78 79 lock (slaveLocker) { … … 318 319 // job does not exist in db 319 320 Logger.Error("Job does not exist in DB: " + jobProgress.Key); 320 //actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key));321 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key)); 321 322 } else { 322 323 curJob.Slave = DaoLocator.SlaveDao.GetSlaveForJob(curJob.Id); … … 325 326 // assigned slave does not match heartbeat 326 327 Logger.Error("The slave " + heartbeatData.SlaveId + " is not supposed to calculate Job: " + curJob.ToString()); 327 //actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));328 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 328 329 } else { 329 330 // save job execution time … … 333 334 // a request to abort the job has been set 334 335 Logger.Error("Job is in state aborted, send AbortJob: " + curJob.Id); 335 //actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 336 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id)); 337 DaoLocator.JobDao.UnAssignSlaveToJob(curJob.Id); 336 338 } else if (curJob.State == JobState.SnapshotRequested) { 337 339 // a request for a snapshot has been set … … 340 342 } 341 343 } 342 }343 DaoLocator.JobDao.Update(curJob);344 DaoLocator.JobDao.Update(curJob); 345 } 344 346 } 345 347 … … 364 366 DaoLocator.JobDao.Update(currJob); 365 367 366 //actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, currJob.Id));368 actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, currJob.Id)); 367 369 368 370 lifecycleManager.NewAssignedJobs.Remove(currJob.Id); … … 370 372 } else { 371 373 Logger.Error("Job ID wasn't with the heartbeats: " + currJob); 372 currJob.State = JobState.Offline;373 DaoLocator.JobDao.Update(currJob);374 //currJob.State = JobState.Offline; 375 //DaoLocator.JobDao.Update(currJob); 374 376 } 375 377 } // lock
Note: See TracChangeset
for help on using the changeset viewer.