Rake tasks for scaling ruby apps in Heroku (non-rails)? -


i'm running ruby app with:

heroku scale web=0 heroku scale worker=1 

i'd write rake task run:

heroku scale worker=0 

i'm thinking of akin to:

task :scale_down => :environment   heroku = heroku::api.new   heroku.post_ps_scale('worker', 0) end 

but 1 problem app doesn't have environment since it's not rails app. there simple rake task can use scale worker 0? thanks!

task :scale_down   heroku = heroku::api.new(api_key: env['heroku_api_key'])   heroku.post_ps_scale(env['app_name'], 'worker', 0) end 

this scales app down 0. may want assign number config var..


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -