增加定时任务,
This commit is contained in:
1 parent
be1fc11e07
commit
be08510a84
10 files changed
+171
-8
No files matched your search
@@ -0,0 +1,15 @@
|
||||
using Hangfire;
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.Web.Http.Dependencies;
|
||||
|
||||
namespace Store.Framework.Jobs;
|
||||
|
||||
public class ContainerJobActivator : JobActivator
|
||||
{
|
||||
private readonly IDependencyResolver _provider;
|
||||
public ContainerJobActivator(IDependencyResolver provider) => _provider = provider;
|
||||
|
||||
public override object ActivateJob(Type jobType)
|
||||
=> _provider.GetService(jobType);
|
||||
}
|
||||
Reference in new issue
Block a user