sidekiq工人失败仍然显示工作已完成

发布于 2025-01-31 05:10:59 字数 136 浏览 2 评论 0原文

我正在使用Sidekiq处理电子邮件和短信作业。我已经观察到Sidekiq中的一些奇怪行为,因为一些数据或某些工作人员介于两者之间,并且邮件将不会被处理,但Shill Sidekiq显示了“作业完成”,并增加了处理状态的计数。这是什么行为?我在这里想念什么?

I'm using Sidekiq for processing emails and sms jobs. I have observed some strange behaviour in Sidekiq, where because of some missing data or something worker crashes in between, and mail will not be processed but still Sidekiq shows "jobs completed" and increases processed count in status. What is this behaviour? what am i missing here?

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

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

发布评论

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

评论(1

心如狂蝶 2025-02-07 05:10:59

当提出例外时,Sidekiq仅将工作标记为失败。它无法弄清楚“某件事没有正确完成”。

如果发生意外情况或根本没有发生任何事情,请确保引起您的工作错误。例如,使用#CREATE! #create之类的方法使用BANG版本()。

另外,这项工作有可能在后来的重试中重新夺回并取得了成功。

Sidekiq only marks a job as failed, when an exception was raised. It can't figure out if "something wasn't properly done".

Make sure to raise an error in your job, if something unexpected happens or nothing happens at all. For example use the bang version (!) of methods like #create! over #create.

Also there's the chance that the job was retried and succeeded in a later retry.

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