gpt4 book ai didi

hangfire - 限制 hangfire 从特定队列中获取作业

转载 作者:行者123 更新时间:2023-12-01 22:18:23 25 4
gpt4 key购买 nike

我有 2 个 hangfire 实例/服务器在运行。两者都指向同一个 hangfire 数据库。如何限制其中一个 hangfire 实例仅从特定队列中获取作业并忽略其他队列?

谢谢

最佳答案

启动实例时,您可以提供要由服务器监视的队列列表:

app.UseHangfireServer(new BackgroundJobServerOptions()
{
// order defines priority
// beware that queue names should be lowercase only
Queues = new [] { "critical", "default", "myqueue" }
});

关于hangfire - 限制 hangfire 从特定队列中获取作业,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42162632/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com