//private static readonly ILog ManagerLogger = LogManager.GetLogger("Stardust.ManagerLog"); public JobManager(IJobRepository jobRepository, IWorkerNodeRepository workerNodeRepository, ManagerConfiguration managerConfiguration, JobPurgeTimer jobPurgeTimer, NodePurgeTimer nodePurgeTimer, NodeManager nodeManager, ILog logger) { _jobRepository = jobRepository; _workerNodeRepository = workerNodeRepository; _managerConfiguration = managerConfiguration; _nodeManager = nodeManager; ManagerLogger = logger; _checkAndAssignJob.Elapsed += AssignJobToWorkerNodes_Elapsed; _checkAndAssignJob.Interval = _managerConfiguration.CheckNewJobIntervalSeconds * 1000; _checkAndAssignJob.Start(); _checkHeartbeatsTimer.Elapsed += CheckHeartbeats_Elapsed; _checkHeartbeatsTimer.Interval = _managerConfiguration.AllowedNodeDownTimeSeconds * 1000; _checkHeartbeatsTimer.Start(); jobPurgeTimer.Start(); nodePurgeTimer.Start(); }
public JobManager(IJobRepository jobRepository, IWorkerNodeRepository workerNodeRepository, ManagerConfiguration managerConfiguration, JobPurgeTimer jobPurgeTimer, NodePurgeTimer nodePurgeTimer) { _jobRepository = jobRepository; _workerNodeRepository = workerNodeRepository; _managerConfiguration = managerConfiguration; _checkAndAssignJob.Elapsed += AssignJobToWorkerNodes_Elapsed; _checkAndAssignJob.Interval = _managerConfiguration.CheckNewJobIntervalSeconds*1000; _checkAndAssignJob.Start(); _checkHeartbeatsTimer.Elapsed += CheckHeartbeats_Elapsed; _checkHeartbeatsTimer.Interval = _managerConfiguration.AllowedNodeDownTimeSeconds*200; _checkHeartbeatsTimer.Start(); jobPurgeTimer.Start(); nodePurgeTimer.Start(); }
public NodeManager(IWorkerNodeRepository nodeRepository, IJobRepository jobRepository) { _nodeRepository = nodeRepository; _jobRepository = jobRepository; }
public NodeManager(IWorkerNodeRepository nodeRepository, IJobRepository jobRepository) { _nodeRepository = nodeRepository; _jobRepository = jobRepository; }