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

Is there a way to specify the 'email' queue with DJ3? #5

Open
brightball opened this issue May 25, 2012 · 1 comment
Open

Is there a way to specify the 'email' queue with DJ3? #5

brightball opened this issue May 25, 2012 · 1 comment

Comments

@brightball
Copy link

I was planning to setup a dedicated email worker as we're using a lot of DJ and I'd like to avoid delays if the rest of the queue is backed up for some reason. Is it possible to specify that the job go to the 'email' queue?

@dgeb
Copy link
Member

dgeb commented May 25, 2012

You could override enqueue() in DelayedMailhopper::Email to place it in a particular queue. See:

https://github.com/cerebris/delayed_mailhopper/blob/master/app/models/delayed_mailhopper/email.rb#L9

For instance:

def enqueue
  Delayed::Job.enqueue(SendJob.new(self.id), :queue => 'email')
end

I might consider adding an option to this lib to make this even easier.

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