The develop language is dotnet core 3.0. I dont't have idea.Help Me!Thanks a lot.
The function like below :
function test(){
BackgroundJob.Schedule<TradeCenterService>((s) => s.HandleSettlementJob(recordId), TimeSpan.FromSeconds(60));
}
I have config the hanfire in test class,like this
[DependsOn(typeof (AbpHangfireModule))]
public class MyProjectWebModule : AbpModule
{
public override void PreInitialize()
{
Configuration.BackgroundJobs.UseHangfire();
}
//...
}
Now the test result error message is :
System.InvalidOperationException : JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API.
堆栈跟踪:
JobStorage.get_Current()
BackgroundJobClient.ctor()
<.cctor>b__45_0()
Lazy`1.PublicationOnlyViaFactory(LazyHelper initializer)
Lazy`1.CreateValue()
Lazy`1.get_Value()