如何清除卡住/陈旧的 Resque 工人? [英] How do I clear stuck/stale Resque workers?

查看:23
本文介绍了如何清除卡住/陈旧的 Resque 工人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如您从附加图片中看到的,我有几个工人似乎被卡住了.这些过程不应超过几秒钟.

As you can see from the attached image, I've got a couple of workers that seem to be stuck. Those processes shouldn't take longer than a couple of seconds.

我不确定他们为什么不清除或如何手动删除它们.

I'm not sure why they won't clear or how to manually remove them.

我在 Heroku 上使用带有 Redis-to-Go 和 HireFire 的 Resque 来自动扩展工作人员.

I'm on Heroku using Resque with Redis-to-Go and HireFire to automatically scale workers.

推荐答案

这些解决方案都不适合我,我仍然会在 redis-web 中看到:

None of these solutions worked for me, I would still see this in redis-web:

0 out of 10 Workers Working

最后,这对我来说清除了所有工人:

Finally, this worked for me to clear all the workers:

Resque.workers.each {|w| w.unregister_worker}

这篇关于如何清除卡住/陈旧的 Resque 工人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆