Why does Resque show "0 out of 0 Workers Working" while a worker is running? No jobs getting picked up

547 views Asked by At

I'm trying to test out my Ruby on Rails app. I have redis running, I have a rails server setup and I started a Resque worker in the terminal via the command rake resque:work QUEUE=*, which responds correctly with INFO 2020-01-08 12:10:00 -0500: Starting worker main. When I check the Resque UI in my browser it shows 0 out of 0 workers working. I don't get any error messages in either the terminal or the browser. No jobs are getting picked up, and when I check Resque.workers in the rails console it returns an empty array even while the worker is running in an adjacent tab.

Another test I tried is using --trace as so:

bundle exec rake resque:work --trace
** Invoke resque:work (first_time)
** Invoke resque:preload (first_time)
** Invoke resque:setup (first_time)
** Invoke environment (first_time)
** Execute environment

** Execute resque:setup
** Execute resque:preload
** Invoke resque:setup 
** Execute resque:work
set QUEUE env var, e.g. $ QUEUE=critical,high rake resque:work

Which, as shown above, doesn't return anything of notice (at least to me). Anyone know why my workers aren't being acknowledged?

1

There are 1 answers

0
Raynor On

So I ended up fixing this by changing the redis db to use 0 instead of 1 'redis://localhost:6379/0' Any other number results in the workers not being picked up or acknowledged although I can't say why. If anyone knows I'm still interested in hearing what's going on here even though it's solved.