[Support] 请问bull如何控制任务执行的频率? #3591
-
Describe the problem(描述问题)如果我有3台服务器,每台服务器启动4个实例,我想控制每台服务器在1秒内最多同时执行2个任务,应该如何设置?我是这么写的,但是却不生效,同一时间依然会有4个任务在执行。
Midway Versions(Midway 版本)"@midwayjs/bull": "^3.11.15", |
Beta Was this translation helpful? Give feedback.
Answered by
czy88840616
Jan 31, 2024
Replies: 1 comment 9 replies
-
启动两个进程即可,现在默认应该是每个进程执行一个 job。 |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
任务是由 bull(redis)下发,和进程或者应用无关,完全可以一个 http 服务添加任务,另外的 bull 服务接收任务信息执行。