-2

In Hangfire Recurring Jobs:

HangfirePeriodicBackgroundWorkerAdapter<BackgroundJobWorker>.DoWorkAsync

What the first one means? Can I delete it?

It seems to be executed every five seconds? Will it consume too much resources?

Thanks very match!

liquehuo
  • 3
  • 2
  • **DO NOT post images of code, data, error messages, etc.** - copy or type the text into the question. [ask] – Rob Mar 04 '23 at 15:15

1 Answers1

0

https://i.stack.imgur.com/jZJDv.png

This task is added by the AbpBackgroundWorkersHangfireModule module, from the ConfigureServices method.

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddSingleton(typeof(HangfirePeriodicBackgroundWorkerAdapter<>));
    }

To disable this task, you must override the module method.

public class MyAbpBackgroundWorkersHangfireModule : AbpBackgroundWorkersHangfireModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        //base.ConfigureServices(context);
    }
}

And replace DependsOn(typeof(AbpBackgroundWorkersHangfireModule)) by DependsOn(typeof(MyAbpBackgroundWorkersHangfireModule)).

Warning: I do not know the effects that this can cause.

Kalves
  • 77
  • 6