Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/11 14:54:17 (14 years ago)
Author:
cneumuel
Message:

#1233

  • updated jobstates documentation
  • enhanced ganttChart
  • fixed setting of jobstates
  • added option to force lifecycle-trigger (mainly for testing purposes)
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  
    126126      }
    127127    }
     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    }
    128146    #endregion
    129147
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Interfaces/IHiveDao.cs

    r5633 r5636  
    1616    IEnumerable<DT.Job> GetWaitingJobs(DT.Slave slave, int count);
    1717    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);
    1819    #endregion
    1920
Note: See TracChangeset for help on using the changeset viewer.