Esempio n. 1
0
 public PersistentScheduler(Scheduler scheduler, IPersistStorage storage,
                            ILogger <PersistentScheduler> logger)
 {
     _scheduler = scheduler;
     _storage   = storage;
     _logger    = logger;
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public static extern int OleSave(ref IPersistStorage pPS, ref IStorage pStg, [MarshalAs(UnmanagedType.Bool)] bool fSameAsLoad);
Esempio n. 4
0
        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)));
        }