Finding schedules in resque - ruby -


I am using resque to process some background jobs (like Cron jobs). So I set fire to these two rack works:
$ & gt; Rake Risk: Work # $> Rake Res: Scheduler

My question is how to find the employee and the scheduler? For the worker I can use

Resque :: Worker.all to list all workers. And it works fine but I have not figured out how the scheduler can get runnig or not (or list of all fixed jobs). I tried Resque :: Scheduler.print_schedule but it does not print from time to time and always gives an APMT hash, even if I have rake resque: scheduler

The method you need

  Resque.get_schedules   

It currently displays a hash of scheduled jobs and their respective metadata.

  {"job1" = & gt; {"Every" = & gt; "30s", "class" = & gt; "Job Class", "Args" => [1], "queue" => "Default", "Details" = & gt; "Test ..."}}   

If you are not dynamically adding any functions, that is, you are not using the dynamic setting of the resque-scheduler

  Resque :: Scheduler.dynamic = true   

then

  Resque.schedule   

Will give you the same results.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -