I ended up using pry instead of ruby-debugger. Works like a charm. Practically an Irish charm!
How can I use ruby-debugger inside of a resque job?
-
18-03-2022 - |
سؤال
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
نصائح أخرى
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
لا تنتمي إلى StackOverflow