- Timestamp:
- 03/08/11 14:54:17 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r5633 r5636 126 126 } 127 127 } 128 129 public DT.Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception) { 130 using (var db = CreateContext()) { 131 var job = db.Jobs.SingleOrDefault(x => x.JobId == jobId); 132 job.State = jobState; 133 db.StateLogs.InsertOnSubmit(new StateLog { 134 JobId = jobId, 135 State = jobState, 136 SlaveId = slaveId, 137 UserId = userId, 138 Exception = exception, 139 DateTime = DateTime.Now 140 }); 141 db.SubmitChanges(); 142 job = db.Jobs.SingleOrDefault(x => x.JobId == jobId); 143 return Convert.ToDto(job); 144 } 145 } 128 146 #endregion 129 147 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Interfaces/IHiveDao.cs
r5633 r5636 16 16 IEnumerable<DT.Job> GetWaitingJobs(DT.Slave slave, int count); 17 17 IEnumerable<DT.Job> GetParentJobs(IEnumerable<Guid> resourceIds, int count, bool finished); 18 DT.Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception); 18 19 #endregion 19 20
Note: See TracChangeset
for help on using the changeset viewer.