Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/11 14:54:17 (13 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)
File:
1 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
Note: See TracChangeset for help on using the changeset viewer.