سؤال

I'm looking for a command to start a worker process so that inside of the job's perform method I can call debugger and have control thrown to the command prompt.

هل كانت مفيدة؟

المحلول 3

I ended up using pry instead of ruby-debugger. Works like a charm. Practically an Irish charm!

نصائح أخرى

instead of calling Resque.enqueue(Archive, self.id, branch) (from the resque readme), I think you should be able to call Archive.perform(self.id, branch). Doing this, you should be able to use debugger inside the worker.

Add the following line to your rails app Resque.inline = true this causes the resque jobs not be enqueued but to be executed immediately

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top