예제 #1
0
 public void Add(Job job, JobSchedule jobSchedule)
 {
     if (m_activeJobs.Any(x => x.JobId == job.Id))
     {
         return;
     }
     m_logger.Info("Enqueueing {0}", job.Name);
     var je = new JobExecutioner(job, jobSchedule, this.TaskManager);
     m_activeJobs.Add(je);
     m_jobQueue.Enqueue(je);
 }
예제 #2
0
		public JobExecutioner(Job job, JobSchedule jobSchedule, TaskManager taskManager)
		{
			m_db = ContextFactory.CreateContext();
			m_job = job;
			m_jobSchedule = jobSchedule;
			m_stopwatch = new Stopwatch();
			m_cancelToken = new CancellationTokenSource();
            m_taskManager = taskManager;
            m_logger = Logging.LogProvider.Instance.Logger;
			this.OutCome = JobStepOutCome.Unknown;
			this.Status = JobStatus.WaitingForWorkerThread;
			ReportQueuedDateTime();
		}