Resque Gem - I cannot get the proper queue data

25 views Asked by At

Why I cannot get all the queues data, using Resque.queues The result in json was:

{
  data: [
    "active_calls"
  ]
}

Only the name in:

class ActiveCallsJob < ActiveJob::Base
  queue_as :active_calls << (this name)
end
1

There are 1 answers

0
Cristian Bica On

Your queue_as line will be executed only once when the code will be parsed. But there's another solution for your issue: you can pass a block to queue_as. See here: http://guides.rubyonrails.org/active_job_basics.html#queues