Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7703657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:30:32+00:00 2026-05-31T23:30:32+00:00

My environment is rails 3.1, heroku bamboo stack, delayed_job_active_record, (https://github.com/collectiveidea/delayed_job ) and experimenting with

  • 0

My environment is rails 3.1, heroku bamboo stack, delayed_job_active_record, (https://github.com/collectiveidea/delayed_job ) and experimenting with hirefire. (https://github.com/meskyanichi/hirefire) – I can see the delayed_job queue documentation, but how do I apply this on heroku?

I have a max priority set of tasks that get spawned off every hour that I need to dedicate 3 workers to, it takes approx 26 minutes to complete. During that time, less important background tasks need to continue, with perhaps 1 worker dedicated to them.

So I’ll set that block of priority tasks to being in a named queue, e.g. ‘hourtask’, and then name a queue for everything else ‘everythingelse’ 🙂

The question is, how do I dedicate heroku workers to specific queues? Is it something to do with the environment variables as per the documentation? It says:

# Set the --queue or --queues option to work from a particular queue.
$ RAILS_ENV=production script/delayed_job --queue=tracking start
$ RAILS_ENV=production script/delayed_job --queues=mailers,tasks start

But I’m not familiar enough with heroku setup to work out how to apply this to my heroku production environment?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:30:34+00:00Added an answer on May 31, 2026 at 11:30 pm

    It’s in the README for Delayed Job 3:

    DJ 3 introduces Resque-style named queues while still retaining DJ-style priority. The goal is to provide a system for grouping tasks to be worked by separate pools of workers, which may be scaled and controlled individually.

    Jobs can be assigned to a queue by setting the queue option:

    object.delay(:queue => 'tracking').method
    
    Delayed::Job.enqueue job, :queue => 'tracking'
    
    handle_asynchronously :tweet_later, :queue => 'tweets'
    

    script/delayed_job can be used to manage a background process which will start working off jobs.

    To do so, add gem “daemons” to your Gemfile and make sure you’ve run rails generate delayed_job.

    You can then do the following:

    $ RAILS_ENV=production script/delayed_job start
    $ RAILS_ENV=production script/delayed_job stop
    
    # Runs two workers in separate processes.
    $ RAILS_ENV=production script/delayed_job -n 2 start
    $ RAILS_ENV=production script/delayed_job stop
    
    # Set the --queue or --queues option to work from a particular queue.
    $ RAILS_ENV=production script/delayed_job --queue=tracking start
    $ RAILS_ENV=production script/delayed_job --queues=mailers,tasks start
    

    Work off queues by setting the QUEUE or QUEUES environment variable.

    QUEUE=tracking rake jobs:work
    QUEUES=mailers,tasks rake jobs:work
    

    On Heroku, In your procfile, create two entries:

    worker1: QUEUE=tracking rake jobs:work
    worker2: QUEUES=mailers,tasks rake jobs:work
    

    and scale them individually:

    heroku ps:scale worker1=2 worker2=1 
    

    etc

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

UPDATE 9th june 2012: Setup with mongoid 3.0.0.rc at heroku, see this gist: https://gist.github.com/2900804
I reading Rails Tutorial and created a Sample_App. My code is available here: https://github.com/namic/sample_app
Does anyone know how i can use BST for config.time_zone in my rails config/environment.rb
I am having problems deploying a Rails app to Heroku, I can't even run
I recently forked https://github.com/fortuity/rails3-mongoid-omniauth and tried to get login working for different providers. It
I have a rails project deployed on heroku which has only a production environment.
How can I deploy my Ruby-on-Rails app to a Staging environment on EngineYard and
I have no rails environment but I want to use cruisecontrol.rb as my Continous
I have a rails environment which I set-up with macports. I recently updated macports
I've seen a bunch of articles relating to loading the entire Rails environment for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.