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 - |
Question
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.
Solution 3
OTHER TIPS
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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow