Created
October 24, 2013 07:56
-
-
Save nthj/7133000 to your computer and use it in GitHub Desktop.
Running background workers on Heroku without paying for extra dynos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adjust according to your own needs | |
# Be sure to chmod +x before committing | |
# Store this in your app's 'bin/' directory | |
if [[ $DAEMONIZED_WORKER_CONCURRENCY -gt 0 ]]; then | |
# Adjust the '-q' flags as you need them, or swap this out for Resque or Delayed::Job | |
bundle exec sidekiq --concurrency $DAEMONIZED_WORKER_CONCURRENCY -q mailer,2 -q default --verbose; | |
fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console: bundle exec rails console | |
rake: bundle exec rake | |
web: daemonized-worker & web | |
worker: worker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adjust according to your own needs | |
# Be sure to chmod +x before committing | |
# Store this in your app's 'bin/' directory | |
bundle exec unicorn -c config/unicorn.rb -E $RACK_ENV -p $PORT config.ru --no-default-middleware |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment