public PersistentScheduler(Scheduler scheduler, IPersistStorage storage, ILogger <PersistentScheduler> logger) { _scheduler = scheduler; _storage = storage; _logger = logger; }
public ScheduleJobPsUnitTests() { _jobMaker = new TestJobMaker(); _scheduler = new JobManagmentSystem.Scheduler.Scheduler(NullLogger <JobManagmentSystem.Scheduler.Scheduler> .Instance); var options = Options.Create(new FileStorage { StoragePath = $"{nameof(ScheduleJobPsUnitTests)}.ndjson" }); _storage = new JobsFileStorage(NullLogger <JobsFileStorage> .Instance, options); _persistentScheduler = new PersistentScheduler(_scheduler, _storage, NullLogger <PersistentScheduler> .Instance); }
public static extern int OleSave(ref IPersistStorage pPS, ref IStorage pStg, [MarshalAs(UnmanagedType.Bool)] bool fSameAsLoad);
public static void Reschedule(IScheduler scheduler, IPersistStorage storage) { var jobs = storage.GetJobsAsync().Result; jobs.OnSuccess(() => jobs.Value.ToList().ForEach(async x => await scheduler.ScheduleJobAsync(x))); }