Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queue name when async through dj #563

Closed
inquisitivus opened this issue Feb 2, 2017 · 3 comments
Closed

queue name when async through dj #563

inquisitivus opened this issue Feb 2, 2017 · 3 comments

Comments

@inquisitivus
Copy link
Contributor

Hi!
Is there any way to specify delayed_job queue name for async submissions?
Something like config.use_resque :queue => 'my_queue' for Resque.

@jondeandres
Copy link
Contributor

Hey @inquisitivus, thanks for writing. For resque you can just use config.use_resque for the default queue, or you can set the queue as you suggest: config.use_resque :queue => :my_queue.

@jondeandres
Copy link
Contributor

@inquisitivus sorry, I though you were asking for resque and not delayed_job.

Currently we don't support named queues for DJ, we'll do this soon. Until we fix this and release a new version of the gem, you can have the same behavior using this snippet:

require 'rollbar/delay/delayed_job'

ROLLBAR_DJ_QUEUE = 'rollbar'

Rollbar::Delay::DelayedJob.instance_eval do
  def call(payload)
    new.delay(:queue => ROLLBAR_DJ_QUEUE).call(payload)
  end
end

Ping us if you have any problem with it and we'll help you. Thanks!

@inquisitivus
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants