| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Core; |
| | | |
| | | namespace WIDESEAWCS_QuartzJob |
| | | { |
| | |
| | | { |
| | | _serviceProvider = serviceProvider; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 实现接口Job |
| | | /// </summary> |
| | |
| | | { |
| | | try |
| | | { |
| | | if (App.ExpDateTime != null && (DateTime.Now - App.ExpDateTime.GetValueOrDefault()).Seconds > 0) |
| | | { |
| | | throw new InvalidOperationException($"验证错误"); |
| | | } |
| | | |
| | | IServiceScope serviceScope = _serviceProvider.CreateScope(); |
| | | IJob? job = serviceScope.ServiceProvider.GetService(bundle.JobDetail.JobType) as IJob; |
| | | return job; |