Browse Source
Merge pull request #11062 from abpframework/auto-merge/rel-5-0/741
Merge branch dev with rel-5.0
pull/11068/head
maliming
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
framework/src/Volo.Abp.BackgroundWorkers.Hangfire/Volo/Abp/BackgroundWorkers/Hangfire/HangfireBackgroundWorkerManager.cs
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Reflection; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
@ -32,7 +32,7 @@ public class HangfireBackgroundWorkerManager : IBackgroundWorkerManager, ISingle |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
RecurringJob.AddOrUpdate(hangfireBackgroundWorker.RecurringJobId, () => hangfireBackgroundWorker.DoWorkAsync(), |
|
|
|
RecurringJob.AddOrUpdate(hangfireBackgroundWorker.RecurringJobId,() => hangfireBackgroundWorker.DoWorkAsync(), |
|
|
|
hangfireBackgroundWorker.CronExpression); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -42,7 +42,7 @@ public class HangfireBackgroundWorkerManager : IBackgroundWorkerManager, ISingle |
|
|
|
|
|
|
|
if (worker is AsyncPeriodicBackgroundWorkerBase or PeriodicBackgroundWorkerBase) |
|
|
|
{ |
|
|
|
var timer = (AbpTimer)worker.GetType() |
|
|
|
var timer = (AbpAsyncTimer) worker.GetType() |
|
|
|
.GetProperty("Timer", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(worker); |
|
|
|
period = timer?.Period; |
|
|
|
} |
|
|
|
|