Name: rake-multiple
Owner: Rainforest QA
Description: Run a rake task in multiple processes.
Created: 2015-02-17 21:05:54.0
Updated: 2015-02-17 21:35:40.0
Pushed: 2015-02-17 21:35:40.0
Homepage: null
Size: 128
Language: Ruby
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Rake::Multiple is the easiest way to run the same Rake task in multiple forked processes. It's particularly useful if your app is hosted on a PaaS provider, such as Heroku, and you want to run multiple worker processes by container, saving money.
Add this line to your application's Gemfile:
'rake-multiple'
And then execute:
$ bundle
Rake::Multiple can invoke any task by prefixing the multiple
namespace to the task. So if you're running:
jobs:work
You can then run two processes in your app with the following command:
IPLE_WORKER_COUNT=2 rake multiple:jobs:work
If your tasks need has dependencies, you can run a specific dependency by using the MULTIPLE_EXECUTE_TASK
variable.
IPLE_WORKER_COUNT=2 MULTIPLE_EXECUTE_TASK=environment rake multiple:jobs:work
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)