Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/11 10:38:36 (13 years ago)
Author:
ascheibe
Message:

#1233

  • moved DTO's to Services.Hive project
  • removed Services.Hive.Common project
  • some cleanups
  • added DTO's for enums
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs

    r6463 r6717  
    2323using System.Collections.Generic;
    2424using System.Linq;
    25 using HeuristicLab.Services.Hive.Common;
    26 using HeuristicLab.Services.Hive.Common.DataTransfer;
     25using HeuristicLab.Services.Hive.DataTransfer;
     26using DA = HeuristicLab.Services.Hive.DataAccess;
    2727
    2828namespace HeuristicLab.Services.Hive {
    2929  public class HeartbeatManager {
    30     private DataAccess.IHiveDao dao {
     30    private IHiveDao dao {
    3131      get { return ServiceLocator.Instance.HiveDao; }
    3232    }
     
    7575      if (dao.GetJob(job.Id).State != JobState.Waiting) return false;
    7676
    77       job = dao.UpdateJobState(job.Id, JobState.Transferring, slave.Id, null, null);
     77      job = dao.UpdateJobState(job.Id, DataAccess.JobState.Transferring, slave.Id, null, null);
    7878
    7979      // from now on the job has some time to send the next heartbeat (ApplicationConstants.TransferringJobHeartbeatTimeout)
     
    102102            // job does not exist in db
    103103            actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, jobProgress.Key));
    104             LogFactory.GetLogger(this.GetType().Namespace).Log("Job does not exist in DB: " + jobProgress.Key);
     104            DA.LogFactory.GetLogger(this.GetType().Namespace).Log("Job does not exist in DB: " + jobProgress.Key);
    105105          } else {
    106106            if (curJob.CurrentStateLog.SlaveId == Guid.Empty || curJob.CurrentStateLog.SlaveId != heartbeat.SlaveId) {
    107107              // assigned slave does not match heartbeat
    108108              actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
    109               LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate Job: " + curJob);
     109              DA.LogFactory.GetLogger(this.GetType().Namespace).Log("The slave " + heartbeat.SlaveId + " is not supposed to calculate Job: " + curJob);
    110110            } else if (!JobIsAllowedToBeCalculatedBySlave(heartbeat.SlaveId, curJob)) {
    111111              // assigned resources ids of job do not match with slaveId (and parent resourceGroupIds); this might happen when slave is moved to different group
Note: See TracChangeset for help on using the changeset viewer.