- Add a new worker to your
Procfile
. In this gist I usedreporter
- Add the Heroku Platform gem to your
Gemfile
- Create the
HerokuReporterDyno
module inlib
or any other auto-loadable path - Create two jobs. A caller (
Reporting::GeneratorJob
) and a runner (Reporting::RunnerJob
) - Deploy
- Once deployed, log into Heroku and change the newly added
reporter
dyno to a Performance M or Performance M dyno
Simply run the caller job Reporting::GeneratorJob.perform_later
and it will scale the reporter
dyno up to 1
and run the runner job. Once the runner job is complete, it will scale the reporter
dynoe back to 0.
Simple... To run very heavy reporting aggregation jobs using high spec dynos at affordable costs