ruby on rails 3 - Can't get Delayed::Job to work with a very simple class -


i have problem using delayed::job 2.1.4 on simple class, is:

class c2dmjob < struct.new(:msg)   def perform     # doing   end end 

at begining put class @ lib directory moved after model directory testing purposes. when running: delayed::job.enqueue c2dmjob.new('foo') following entry stored inside delayed::job table:

0, handler: "--- !ruby/struct:c2dmjob \nmsg: foo\n", last_error: nil, run_at: "2011-07-21 10:56:58", locked_at: nil, failed_at: nil, locked_by: nil, created_at: "2011-07-21 10:56:58", updated_at: "2011-07-21 10:56:58">

and job fails following error message:

[worker(host:xxx pid:2660)] c2dmjob failed nomethoderror: have nil object when didn't expect it! might have expected instance of array. error occurred while evaluating nil.each - 1 failed attempts

what think wrong? suspect related serialization have no clue exactly!

thanks!

the reason class names coincidence, delayedjob looking perform method class same name


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -