0

I'm trying to use delayed job for the first time in my rails 3 app.

I have a method that looks something like this, which calls a long running method which I want to put into the delayed job queue.

def complete_order()
    self.paid_at = Time.now
    self.delay.long_running_stuff
end

The result of running this method is an entry in my delayed_jobs table with a NULL value in the handler field.

I have no idea why and can't think of how to debug this. Any ideas why?

Nathan Manousos
  • 13,328
  • 2
  • 27
  • 37
  • Is complete_order a method on an ActiveRecord model? What does the long_running_stuff method look like? –  Dec 02 '11 at 03:42
  • 1
    I've discovered a questions which solves my problem, mine should be considered a duplicate of: http://stackoverflow.com/questions/7966006/delayed-job-2-1-4-error-job-failed-to-load-instance-of-io-needed-handler-ni – Nathan Manousos Dec 02 '11 at 05:44

1 Answers1

0

The problem was attr_accessible

I found a solution here http://groups.google.com/group/delayed_job/browse_thread/thread/60b6ae55a3304c08

Nathan Manousos
  • 13,328
  • 2
  • 27
  • 37