- Timestamp:
- 05/24/11 16:55:48 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4
- Files:
-
- 2 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 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/LifecycleManager.cs
r6229 r6267 52 52 53 53 dao.AddStatistics(stats); 54 55 //int slaveCount = slaves.Count();56 //int cores = slaves.Select(x => x.Cores.HasValue ? x.Cores.Value : 0).Sum();57 //int usedCores = slaves.Select(x => x.FreeCores.HasValue ? x.FreeCores.Value : 0).Sum();58 59 //long memoryMb = slaves.Select(x => x.Memory.HasValue ? x.Memory.Value : 0).Sum(); ;60 //long memoryUsedMb = slaves.Select(x => x.FreeMemory.HasValue ? x.FreeMemory.Value : 0).Sum();61 62 //double averageCpuUtilization = slaves.Select(x => x.CpuUtilization.HasValue ? x.CpuUtilization.Value : 0).Average();63 64 //int executionTimeDelta = 0; // since last update65 66 //{ // per user67 // int activeJobs = 0; // calculating, transferring68 // int waitingJobs = 0; // waiting69 // int stoppedJobs = 0; // finished, failed, aborted, paused70 //}71 72 //{ // per slave73 // int activeJobs = 0; // calculating, transferring74 // double cpuUtilization = 0.0;75 //}76 77 54 } 78 55
Note: See TracChangeset
for help on using the changeset viewer.