Class: SnapDeploy::Provider::Heroku::API::Formation
- Inherits:
-
Object
- Object
- SnapDeploy::Provider::Heroku::API::Formation
- Defined in:
- lib/snap_deploy/provider/heroku/api.rb
Overview
The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the ‘process_types` attribute for the [slug](#slug) currently released on an app.
Instance Method Summary collapse
-
#batch_update(app_id_or_app_name, body) ⇒ Object
Batch update process types.
-
#info(app_id_or_app_name, formation_id_or_formation_type) ⇒ Object
Info for a process type.
-
#initialize(client) ⇒ Formation
constructor
A new instance of Formation.
-
#list(app_id_or_app_name) ⇒ Object
List process type formation.
-
#update(app_id_or_app_name, formation_id_or_formation_type, body) ⇒ Object
Update process type.
Constructor Details
#initialize(client) ⇒ Formation
Returns a new instance of Formation.
886 887 888 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 886 def initialize(client) @client = client end |
Instance Method Details
#batch_update(app_id_or_app_name, body) ⇒ Object
Batch update process types
909 910 911 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 909 def batch_update(app_id_or_app_name, body) @client.formation.batch_update(app_id_or_app_name, body) end |
#info(app_id_or_app_name, formation_id_or_formation_type) ⇒ Object
Info for a process type
894 895 896 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 894 def info(app_id_or_app_name, formation_id_or_formation_type) @client.formation.info(app_id_or_app_name, formation_id_or_formation_type) end |
#list(app_id_or_app_name) ⇒ Object
List process type formation
901 902 903 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 901 def list(app_id_or_app_name) @client.formation.list(app_id_or_app_name) end |
#update(app_id_or_app_name, formation_id_or_formation_type, body) ⇒ Object
Update process type
918 919 920 |
# File 'lib/snap_deploy/provider/heroku/api.rb', line 918 def update(app_id_or_app_name, formation_id_or_formation_type, body) @client.formation.update(app_id_or_app_name, formation_id_or_formation_type, body) end |