コード例 #1
0
 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();
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public JobDataService(JobManagerSettings settings)
 {
     Settings = settings;
 }
コード例 #4
0
 public static void Initialize(JobManagerSettings settings)
 {
     Current = new ScheduleManager(settings);
 }
コード例 #5
0
 private ScheduleManager(JobManagerSettings settings)
 {
     Settings   = settings;
     JobService = new JobDataService(Settings);
 }