开发者

delayed_job processes being killed silently

I have been using delayed_job successfully for a while. I upgraded my Rails installation and now when I run:

./script/delayed_job -n 4 start
开发者_JAVA技巧

to run 4 processes, all 4 processes are created. But they are silently killed immediately, leaving their pid files in RAILS_ROOT/tmp/pids.

This is for delayed_job version 1.8.4 and Rails 2.3.8.


Well I am a ridiculous person. I did NOT know about the "run" option, where I could run delayed_job in the foreground and see exactly what was happening. My database setup is unconventional for rails, and my delayed_job table is not in the same schema as is listed in my config/database.yml table.

The reason this worked before is that I had monkey-patched a vendored delayed_job gem to hardcode the schema where my delayed_jobs table lived. When I upgraded Rails, I upgraded and re-vendored several gems, thus overwriting my previous hard-coding.

Which is why I shouldn't be doing that, I know. Lesson learned.


Check your logs/delayed_job.log for error messages. Make sure that the script is running in the correct environment, for instance if you're running this in production, run RAILS_ENV=production script/delayed_job start

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜