Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/27/10 18:36:36 (14 years ago)
Author:
cneumuel
Message:

worked on HiveExperiment (#1115)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/JobDao.cs

    r3931 r4116  
    2828
    2929      IQueryable<JobDto> query = null;
    30       if (jobState == State.finished) {
     30      if (jobState == State.Finished) {
    3131         query = from job in Context.Jobs
    3232                 where job.JobState == Enum.GetName(typeof (State), jobState)
    3333                 orderby job.DateFinished
    3434                 select EntityToDto(job, null);
    35       } else if (jobState == State.calculating || jobState == State.requestSnapshot || jobState == State.requestSnapshotSent) {
     35      } else if (jobState == State.Calculating || jobState == State.RequestSnapshot || jobState == State.RequestSnapshotSent) {
    3636        query = from job in Context.Jobs
    3737                    where job.JobState == Enum.GetName(typeof(State), jobState)
     
    9797    public IEnumerable<JobDto> FindActiveJobsOfClient(ClientDto client) {
    9898      return (from j in Context.Jobs
    99               where (j.JobState == Enum.GetName(typeof (State), State.calculating) ||
    100                      j.JobState == Enum.GetName(typeof (State), State.abort) ||
    101                      j.JobState == Enum.GetName(typeof (State), State.requestSnapshot) ||
    102                      j.JobState == Enum.GetName(typeof (State), State.requestSnapshotSent)) &&
     99              where (j.JobState == Enum.GetName(typeof (State), State.Calculating) ||
     100                     j.JobState == Enum.GetName(typeof (State), State.Abort) ||
     101                     j.JobState == Enum.GetName(typeof (State), State.RequestSnapshot) ||
     102                     j.JobState == Enum.GetName(typeof (State), State.RequestSnapshotSent)) &&
    103103                    (j.ResourceId.Equals(client.Id))
    104104              select EntityToDto(j, null)).ToList();
     
    112112     
    113113      var q = (from ar in Context.AssignedResources               
    114                where ar.Job.JobState == Enum.GetName(typeof (State), State.offline) &&
     114               where ar.Job.JobState == Enum.GetName(typeof (State), State.Offline) &&
    115115                     ar.Job.CoresNeeded <= freeCores &&
    116116                     ar.Job.MemoryNeeded <= freeMemory &&
     
    139139      Job j = Context.Jobs.SingleOrDefault(jq => jq.JobId.Equals(job.Id));
    140140      j.Client = null;
    141       j.JobState = Enum.GetName(typeof(State), State.offline);
     141      j.JobState = Enum.GetName(typeof(State), State.Offline);
    142142      CommitChanges();
    143143    }
     
    199199     
    200200      target.Priority = source.Priority;
    201       target.State = (State) Enum.Parse(typeof (State), source.JobState);
     201      target.State = (State) Enum.Parse(typeof (State), source.JobState, true);
    202202      return target;
    203203    }
Note: See TracChangeset for help on using the changeset viewer.