Changeset 6267 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
- Timestamp:
- 05/24/11 16:55:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r6168 r6267 147 147 return trans.UseTransaction(() => { 148 148 Job job = dao.UpdateJobState(jobId, jobState, slaveId, userId, exception); 149 149 150 150 if (job.Command.HasValue && job.Command.Value == Command.Pause && job.State == JobState.Paused) { 151 151 job.Command = null; … … 280 280 dbSlave.Memory = slaveInfo.Memory; 281 281 dbSlave.OperatingSystem = slaveInfo.OperatingSystem; 282 283 dbSlave.LastHeartbeat = DateTime.Now; 282 283 dbSlave.LastHeartbeat = DateTime.Now; 284 284 dbSlave.SlaveState = SlaveState.Idle; 285 285 … … 472 472 473 473 public void TriggerLifecycle(bool force) { 474 // use a serializable transaction here to ensure not two threads execute this simultaniously (locking would not work since IIS may use multiple AppDomains) 474 475 trans.UseTransaction(() => { 475 476 DateTime lastCleanup = dao.GetLastCleanup(); … … 478 479 lifecycleManager.Cleanup(); 479 480 } 480 } );481 }, true); 481 482 } 482 483 #endregion … … 526 527 return trans.UseTransaction(() => dao.GetAppointments(x => x.ResourceId == resourceId)); 527 528 } 529 530 public IEnumerable<Job> GetJobsByResourceId(Guid resourceId) { 531 return trans.UseTransaction(() => dao.GetJobsByResourceId(resourceId)); 532 } 528 533 #endregion 529 534 }
Note: See TracChangeset
for help on using the changeset viewer.