Beispiel #1
0
        public async Task JobInterrupted(JobKey jobKey, CancellationToken cancellationToken = new CancellationToken())
        {
            using var container = LionWeb.AutofacContainer.BeginLifetimeScope();
            IScheduler   schedule     = container.Resolve <IScheduler>();
            SysQuartzBll sysQuartzBll = container.Resolve <SysQuartzBll>();
            var          state        = await schedule.GetTriggerState(jobKey.ConvertKey(), cancellationToken);

            await sysQuartzBll.ModifyTaskState(jobKey.Group, jobKey.Name, state);

            Console.WriteLine($"{jobKey.Name}  JobInterrupted");
        }
Beispiel #2
0
        public async Task TriggerFinalized(ITrigger trigger, CancellationToken cancellationToken = new CancellationToken())
        {
            using var container = LionWeb.AutofacContainer.BeginLifetimeScope();
            IScheduler   schedule     = container.Resolve <IScheduler>();
            SysQuartzBll sysQuartzBll = container.Resolve <SysQuartzBll>();
            var          state        = await schedule.GetTriggerState(trigger.Key, cancellationToken);

            await sysQuartzBll.ModifyTaskState(trigger.Key.Group, trigger.Key.Name, state);

            Console.WriteLine($"{trigger.Key.Name} state:{state}  TriggerFinalized");
        }