以下是logfile的实际错误:
2013-02-20T20:56:03+00:00 app[worker.1]: SQL (11.1ms) UPDATE "delayed_jobs" SET locked_by = null, locked_at = null WHERE (locked_by = 'host:05c659a5-86fd-46dd-b139-263e49a96171 pid:2')
2013-02-20T20:56:03+00:00 app[worker.1]: rake aborted!
2013-02-20T20:56:03+00:00 app[worker.1]: PG::Error: ERROR: cannot execute UPDATE in a read-only transaction
2013-02-20T20:56:03+00:00 app[worker.1]: : UPDATE "delayed_jobs" SET locked_at = '2013-02-20 20:56:02.982379', locked_by = 'host:05c659a5-86fd-46dd-b139-263e49a96171 pid:2' WHERE id IN (SELECT id FROM "delayed_jobs" WHERE ((run_at <= '2013-02-20 20:56:02.882553' AND (locked_at IS NULL OR locked_at < '2013-02-20 16:56:02.882574') OR locked_by = 'host:05c659a5-86fd-46dd-b139-263e49a96171 pid:2') AND failed_at IS NULL) ORDER BY priority ASC, run_at ASC LIMIT 1 FOR UPDATE) RETURNING *
此错误也会出现在关注者日志中。这就是假设存在问题的原因。延迟工作版本:3.0.5
答案 0 :(得分:1)
最近的更新似乎出现了问题。有关详细信息,请参阅此Github问题: https://github.com/collectiveidea/delayed_job_active_record/issues/34
对我来说,降级到0.3.3。