Redis 怎样暂停 resque 任务执行

alucardpj · June 25, 2012 · Last by suupic replied at June 26, 2012 · 8712 hits

用 resque 做异步邮件群发功能,目前没有做发送频率控制,就是简单的把群发任务添加到 resque 队列中执行。但由于群发邮件过多很容易触发垃圾邮件规则,因此 resque 在执行时有可能出现

  1. success
  2. success
  3. fail
  4. fail ...

当出现邮件发送失败以后后续任务肯定都无法执行,因此有必要中止队列执行。有什么办法能够暂停 resque 执行吗?

我用 daemon 启动和杀死

关掉进程就好了。下次启动好会继续的,任务队列都在 Redis 里面

你提的这个问题治标不治本啊 resque-restriction 可以很容易地控制 resque job 的频率

You need to Sign in before reply, if you don't have an account, please Sign up first.