public static void Initialize(JobManagerSettings settings, List <JobType> additionalJobTypes = null) { JobTypes = new List <JobType>(); if (additionalJobTypes != null) { foreach (JobType jt in additionalJobTypes) { JobTypes.Add(jt); } } Current = new JobManager(settings); JobPool.Initialize(); }
private JobManager(JobManagerSettings settings) { Settings = settings; JobService = new JobDataService(Settings); //Get all jobs with status running and set them to status abort. var runningJobs = JobService.GetRunningJobs(); foreach (var job in runningJobs) { job.Status = JobStatus.Aborted; job.AbortedBy = Guid.Empty; //by system job.FinishedOn = DateTime.UtcNow; JobService.UpdateJob(job); } }
public JobDataService(JobManagerSettings settings) { Settings = settings; }
public static void Initialize(JobManagerSettings settings) { Current = new ScheduleManager(settings); }
private ScheduleManager(JobManagerSettings settings) { Settings = settings; JobService = new JobDataService(Settings); }