Browse Source
Merge pull request #959 from colinin/fixed-task-run-time
fix(tasks): fixed task run time.
pull/953/merge
yx lin
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
4 additions and
4 deletions
-
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Quartz/LINGYUN/Abp/BackgroundTasks/Quartz/QuartzJobListener.cs
|
|
|
@ -128,13 +128,13 @@ public class QuartzJobListener : JobListenerSupport, ISingletonDependency |
|
|
|
jobEventData.RepeatCount = simpleTrigger.RepeatCount; |
|
|
|
} |
|
|
|
jobEventData.Description = context.JobDetail.Description; |
|
|
|
jobEventData.RunTime = Clock.Normalize(context.FireTimeUtc.DateTime); |
|
|
|
var lastRunTime = context.PreviousFireTimeUtc?.DateTime ?? context.Trigger.GetPreviousFireTimeUtc()?.DateTime; |
|
|
|
jobEventData.RunTime = Clock.Normalize(context.FireTimeUtc.LocalDateTime); |
|
|
|
var lastRunTime = context.PreviousFireTimeUtc?.LocalDateTime ?? context.Trigger.GetPreviousFireTimeUtc()?.LocalDateTime; |
|
|
|
if (lastRunTime.HasValue) |
|
|
|
{ |
|
|
|
jobEventData.RunTime = Clock.Normalize(lastRunTime.Value); |
|
|
|
jobEventData.LastRunTime = Clock.Normalize(lastRunTime.Value); |
|
|
|
} |
|
|
|
var nextRunTime = context.NextFireTimeUtc?.DateTime ?? context.Trigger.GetNextFireTimeUtc()?.DateTime; |
|
|
|
var nextRunTime = context.NextFireTimeUtc?.LocalDateTime ?? context.Trigger.GetNextFireTimeUtc()?.LocalDateTime; |
|
|
|
if (nextRunTime.HasValue) |
|
|
|
{ |
|
|
|
jobEventData.NextRunTime = Clock.Normalize(nextRunTime.Value); |
|
|
|
|