使用 resque/keepalive 分支时如何击落 heroku 上的工作人员?

发布于 2024-12-26 03:41:16 字数 590 浏览 2 评论 0原文

我是 heroku 和 resque 的新手。

我在 resque 中有一个队列,我应该根据队列中当前的工作量自动雇用和释放工人。我尝试了irefireapp,但它只是在队列扩展时雇用工人,并且不会释放任何工人,除非队列中没有等待的工作。所以我做了一些研究,发现没有办法说员工在完成当前工作后不接受新工作并自行关闭。 Resque 开发者和用户也在这个链接中指出了这个问题 https://github.com/defunkt/ resque/issues/319 并创建一个新分支,该分支对 resque 保持活动状态 ( https://github.com/hone/resque/tree/keepalive )。看来这就是我的问题的解决方案。然而,由于我是新使用 resque 的人,所以我不知道如何通过 resque 安全地解雇工人。

如果有在 resque 和 heroku 方面更有经验的人帮助我,我会非常高兴。 谢谢。

I am new at heroku and resque.

I have a queue in resque and i should hire and release workers according to current amount of jobs in my queue automatically. I tried hirefireapp but it just hire workers while queue expands and not release any worker unless there are no job waiting in queue. So i make some research and find out that there is no way to say a worker not take a new job after finished current one and shutdown yourself. Resque developers and users also have pointed out this issue in this link https://github.com/defunkt/resque/issues/319 and create a new branch which is keepalive to resque ( https://github.com/hone/resque/tree/keepalive ). It seems it is the solution for my issue. However, since i am new in using resque i couldn't find out that how to fire a worker via resque safely.

If anyone who have more experienced in resque and heroku help me, i will be really glad.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迟到的我 2025-01-02 03:41:16

您需要运行一个单独的进程来控制工作人员的规模。

resque-heroku-scaler 是一种选择。

一个额外的扩展进程可以帮助您有效地管理工作人员。

You'll want to run a separate process to control the scaling of workers.

resque-heroku-scaler is one option.

A single additional scaler process helps you manage workers efficiently.

征﹌骨岁月お 2025-01-02 03:41:16

这并不是 Resque 的真正设计目的,因为它应该坐在那里工作,而不是决定是否启动/关闭。

就我个人而言,除非 24/7 运行工人所需的资金很难获得,否则我会让它继续运行。

This isn't really what Resque is designed for as it's meant to be sitting there working a queue, not deciding whether or not to start up/shut down.

Personally, unless the money required to run the worker 24/7 is that hard to come by I would just leave it running.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文