gpt4 book ai didi

ruby-on-rails - Delayed_job 多次运行相同的作业?

转载 作者:行者123 更新时间:2023-12-04 06:58:28 25 4
gpt4 key购买 nike

我已经有一段时间没有问题地使用 delay_job 了;主要用于排队 ActionMailer 调用(Notifier.send_later ...)。最近,它从同一工作中随机发送多封电子邮件。我将一封电子邮件放入队列,然后我会同时收到五次、一次或两次。我已经重新启动了 delay_job 并且它似乎有点行为。有人经历过吗?

这是我的日志;我以前从未见过这些错误...

# Logfile created on 2010-02-11 by logger.rb
*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally ***
#<NameError: uninitialized constant Delayed::Worker>
*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions ***
#<NoMemoryError: failed to allocate memory>
#<SystemStackError: stack level too deep>
#<fatal: exception reentered>
#<LoadError: no such file to load -- tmail>
#<SystemExit: exit>
#<NameError: uninitialized constant Delayed::Worker::Merb>
#<NameError: uninitialized constant Merb>
#<NameError: uninitialized constant Delayed::Merb>
#<NameError: uninitialized constant Merb>
#<NameError: uninitialized constant Delayed::Merb>
#<NameError: uninitialized constant Delayed::Worker::Merb>
#<NameError: "Gems::DelayedJob-1.8.4::Lib::Delayed::Worker" is not a valid constant name!>
#<NameError: uninitialized constant Delayed::Worker>

最佳答案

当您部署应用程序的新版本时,请确保杀死所有 DJ 工作人员并仅启动 1 个(或您想要的任何数量 - 从 1 开始调试此问题)。

ps -ef | grep delayed_job

关于ruby-on-rails - Delayed_job 多次运行相同的作业?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2252499/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com