- ABP Framework version: v8.3.x
- UI Type: Angular
- Database System: EF Core (SQL Server)
I just enabled hangfire to process background workers, is there any documentation about what this worker/job is doing? It runs every minute apparently.
HangfirePeriodicBackgroundWorkerAdapter<BackgroundJobWorker>.DoWorkAsync
7 Answer(s)
-
0
Hi,
BackgroundJobWorker
is used to execute background jobs -
0
Could you please provide more information on how it works internally, is it critical for the background jobs functionality? This is something I have not yet deployed into production and my production server runs jobs just fine without that recurring job. I'm just trying to understand this, how does it execute the background jobs?
-
0
Hi,
Yes, it's BackgroundJob system default implementation. https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs
Use a background worker to execute pending jobs every minute. if you want you can use Hangfire background job integration to replace the default
-
0
I am using Hangfire, look at the screen shot, let me know if my question is not clear so I can rephrase it.
-
0
Hi,
As I see, you are using Hangire background worker integration, not Hangfire background job integration. they are different.
if you want to use Hangfire background job integration too , please check this document: https://abp.io/docs/latest/framework/infrastructure/background-jobs/hangfire
PS, don't forget to remove
Volo.Abp.BackgroundJobs
package and removeBackgroundJobWorker
from the Hangfire dashboard -
0
I'm using both, jobs and workers, and I'm very confused by your answers, I followed the documentation to enable both and they are working as expected I assume, I just need to know what is the recurring job that runs every minute doing.
Should I use one or the other or both?
what do you mean by :
PS, don't forget to remove Volo.Abp.BackgroundJobs package and remove BackgroundJobWorker from the Hangfire dashboard Why, and how do I remove them.
-
0
Hi,
PS, don't forget to remove Volo.Abp.BackgroundJobs package and remove BackgroundJobWorker from the Hangfire dashboard Why, and how do I remove them.
Because you are using the Hangfire integration, you don't need the default implementation anymore.
You can remove
BackgroundJobs
module, or you can also not remove it, it does not cause any problems.BackgroundJobs
module packages:- Volo.Abp.BackgroundJobs.Domain
- Volo.Abp.BackgroundJobs.Domain.Shared
- Volo.Abp.BackgroundJobs.EntityFrameworkCore