Ejemplo n.º 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");
        }