Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddRecurringJob 添加QueueName无法保存 #200

Open
zhanght919 opened this issue Oct 7, 2023 · 3 comments
Open

AddRecurringJob 添加QueueName无法保存 #200

zhanght919 opened this issue Oct 7, 2023 · 3 comments

Comments

@zhanght919
Copy link

AddRecurringJob 功能
{
"JobName": "test",
"Method": "POST",
"ContentType": "application/json",
"Url": "http://localhost:5001/api/User/Add",
"Data": {
"Type":1
},
"QueueName":"test",
"Timeout": 5000,
"Cron": "* 0/2 * * *",
"EnableRetry": false,
"RetryTimes": 3,
"RetryDelaysInSeconds": "20,30,60",
"SendSuccess": false
}
上面"QueueName":"test",这里QueueName配置为test,提示添加成功。
然后点击job名称,弹出框中QueueName还是default,并且再进行编辑,保存后还是default,恳请解答

@zhanght919 zhanght919 changed the title AddRecurringJob 添加QueueName无法改变 AddRecurringJob 添加QueueName无法保存 Oct 7, 2023
@yuzd
Copy link
Owner

yuzd commented Oct 7, 2023

你确认下真正执行的时候是在Queue:test吗?
如果是的话,可能再次点击job名称的这里展示的有问题。

@daz-codersoft
Copy link

Hello. I am loving this project you have created! But I do have a problem in that I can't seem to set the queue for a job. I enter a queue name (which already exists), but once I submit the job, and then view it, it has gone to the "default" queue. This happens both when creating a new job, or editing an existing one. I only speak English but I suspect that is what this ticket is about? I'm using Hangfire.HttpJob 3.8.1. I have confirmed that the jobs are also added to the "default" queue when the job fires (and so my job never runs as I don't have a "default" queue).

Thank you.

@daz-codersoft
Copy link

A bit more information...it seems that if I set the DefaultBackgroundJobQueueName and DefaultRecurringQueueName in the call to UseHangfireHttpJob, then it will allow me to change the queue. ie:

.UseHangfireHttpJob(new HangfireHttpJobOptions
{
    MailOption = hangfireConfig.EmailSettings,
    DefaultBackGroundJobQueueName = hangfireConfig.QueueName,
    DefaultRecurringQueueName = hangfireConfig.QueueName,
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants