-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update hangfire.md #22192
base: rel-8.3
Are you sure you want to change the base?
Update hangfire.md #22192
Conversation
docs: Add queue configuration options for Hangfire in ABP documentation - Added instructions for specifying queue names using AddHangfireServer method. - Added instructions for specifying queue names using AbpHangfireOptions. - Included examples for both configurations in the ConfigureServices method.
```csharp | ||
context.Services.AddHangfireServer(options => | ||
{ | ||
options.Queues = new[] { "alpha" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
ABP does not support the method because ABP internally creates a HangfireServer.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.HangFire/Volo/Abp/Hangfire/AbpHangfireOptions.cs#L35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, actually I guessed it already creates a HangifireServer but it worked also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI, after test, it not work. you can try use the demo app https://github.com/omer-repo/abp/tree/patch-2/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq
to configure the AddHangfireServer
method:
You will find that it is still consuming the default
queue
context.Services.AddHangfireServer(options =>
{
options.Queues = new[] { "alpha" };
});
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you test this https://github.com/abpframework/abp/pull/22192/files#r1965509121
docs: Add queue configuration options for Hangfire in ABP documentation
Description
This pull request adds documentation for specifying the queue name for Hangfire jobs in ABP. It includes two methods for setting the queue:
Using AddHangfireServer method.
Using AbpHangfireOptions.
The documentation provides examples for both configurations and explains how to integrate them into the ConfigureServices method.
Checklist