forked from tobi/delayed_job
-
Notifications
You must be signed in to change notification settings - Fork 954
Common problems
Offirmo edited this page May 8, 2011
·
19 revisions
- Does your database includes the "delayed_job" table ? If not, go through installation instructions again.
- Start your app with no workers and check if jobs are added in the database. If not, see "No jobs are added in the database"
- If jobs are present, then launch manually one worker : "rake jobs". Jobs should be processed and disappear from the database.
- If jobs are still here, do they show an error ? If yes, see "jobs show an error".
- If jobs are no longer in the database, they were processed. See log/delayed_job
Assuming the delayed_job table is here, try to inspect the logs (log/developpement.log). Do you use protection against mass assignment ? If yes, you should relax the rules for two fields :
ActiveRecord::Base.send(:attr_accessible, :priority) ActiveRecord::Base.send(:attr_accessible, :payload_object)
Just like you probably did for the sessions, cf. http://railsforum.com/viewtopic.php?id=32634
First just check if the given class has the method (never know !) Then, look closely at the 'handler' field of the job. It should be something like that (action mailer example)
--- !ruby/struct:Delayed::PerformableMailer object: !ruby/class TestMailer method_name: :test_email args: - xxx@gmail.com
And NOT like that :
--- !ruby/struct:Delayed::PerformableMailer object: !ruby/object:Class TestMailer method_name: :test_email args: - xxx@gmail.com
See the difference ? The second one happen when you use the 'thin' server instead of the classic mongrel ('rails server'). I don't know why. For now, the solution is to use 'rails server'.