In my Rails application, I would like to open a window showing the number of Resque workers currently running. Basically it will be such that I can warn users when there are no workers.
I have a Resque admin application also installed in routes.rb:
mount Resque::Server, :at => "/admin/resque"
I see that there is a text file called /admin/resque/stats.txt , which includes the following:
resque.pending=0 resque.processed+=8 resque.failed+=0 resque.workers=2 resque.working=0 queues.model_job_queue=0
Should I extract this file and just resque.workers it for resque.workers value or is there another, better method?
source share