Rails/delayed_job just... not working -


i've spent 3 hours trying simple delayed_job execute without success. have extremely simple job:

class foo   def foo     `echo foo >> /tmp/mrsmee`   end end 

i'm enqueueing in rails action so:

foo.new.delay.foo() 

i'm running job processor so:

$ script/delayed_job run 

i see bunch of output logs this,

2013-05-13t15:21:12-0700: [worker(delayed_job host:asha.local pid:73263)] 1 jobs processed @ 35.6405 j/s, 0 failed ... 

and entries in delayed_backend_mongoid_jobs this,

{ "_id" : objectid("51916452005056107900001a"), "priority" : 0, "attempts" : 0, "queue" : null, "handler" : "--- !ruby/object:delayed::performablemethod\nobject: !ruby/object:foo {}\nmethod_name: :foo\nargs: []\n", "run_at" : isodate("2013-05-13t22:08:18.560z"), "updated_at" : isodate("2013-05-13t22:08:18.560z"), "created_at" : isodate("2013-05-13t22:08:18.560z") } 

so jobs being enqueued, processed, , dequeued. bad test output file, /tmp/mrsmee, never gets written it. i'm @ total loss. why isn't delayed_job running delayed jobs, or @ least telling me what's keeping doing so?

probably little bit in late but:

the problem not delayedjob method. delayedjob executing foo.new.foo.

if try this:

class foo   def foo     puts "hey!, job being executed!"   end end 

and see string in delayedjob's output log, delayedjob working properly

have checked rails (delayedjob) has permissions write in /tmp folder?

this code might (test.txt created , written in app folder):

class foo   def foo     `echo foo >> #{rails.root.join "test.txt"}` #remember delete test.txt!   end end 

if works, i.e. test.txt file created , content foo, problem should permissions sudo script/delayed_job run might help


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -