Base solution for your next web application
Open Closed

BackgroundWorkerManager sometimes starts sometimes doesn't start workers #11973


User avatar
0
npdevs created

Hello,

I'm using the default BackgroundWorkerManager and several PeriodicBackgroundWorkers (Sync versions). Sometimes none of background workers are started at all (and no "DEBUG Start background worker: <worker name>" messages in the output) until workManager.Start() is executed explicitly. So the question is if it's required to run workManager.Start() explicitly (didn't find information on the documentation, previously workers started working without workManager.Start())? Is the any condition for starting workManager automatically?

Asp.Zero 12.4.2.

Thanks.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Normally it is triggered here https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/AbpKernelModule.cs#L107. Do you have any clue how to reproduce this issue ?

  • User Avatar
    0
    npdevs created

    Hi, Sorry, that was my fault. I found a place where Configuration.BackgroundJobs.IsJobExecutionEnabled was set to false. Thanks for getting a link to the code.

    BTW, is it possible to disable UserTokenExpirationWorker only?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Great :). Unfortunately, it is not possible to disable a specific worker. You can delete or comment it.