Class: Neetodeploy::Config
- Inherits:
-
Object
- Object
- Neetodeploy::Config
- Includes:
- Singleton
- Defined in:
- lib/neetodeploy/autoscale/config.rb
Instance Attribute Summary collapse
-
#app_name ⇒ Object
Returns the value of attribute app_name.
-
#disable_auto_scale_gem ⇒ Object
Returns the value of attribute disable_auto_scale_gem.
-
#disable_sidekiq_metrics ⇒ Object
Returns the value of attribute disable_sidekiq_metrics.
-
#metrics_server_auth_token ⇒ Object
Returns the value of attribute metrics_server_auth_token.
-
#metrics_server_url ⇒ Object
Returns the value of attribute metrics_server_url.
-
#process_type ⇒ Object
Returns the value of attribute process_type.
-
#report_interval_seconds ⇒ Object
Returns the value of attribute report_interval_seconds.
Instance Method Summary collapse
- #deployment_name ⇒ Object
- #gem_disabled? ⇒ Boolean
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #sidekiq_metrics_disabled? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 14 15 16 |
# File 'lib/neetodeploy/autoscale/config.rb', line 8 def initialize @disable_auto_scale_gem = ENV["DISABLE_NEETO_DEPLOY_AUTOSCALE"] @disable_sidekiq_metrics = ENV["DISABLE_NEETO_DEPLOY_SIDEKIQ_METRICS"] @app_name = ENV["NEETODEPLOY_APP_NAME"] @process_type = ENV["NEETODEPLOY_PROCESS_TYPE"] || "worker" @metrics_server_url = "http://nd-queue-time-exporter-web-deployment:3000/metrics" @metrics_server_auth_token = "K0An3O3MSyEEMTCnRd1IHgGjdGQkzy" @report_interval_seconds = 10 end |
Instance Attribute Details
#app_name ⇒ Object
Returns the value of attribute app_name.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def app_name @app_name end |
#disable_auto_scale_gem ⇒ Object
Returns the value of attribute disable_auto_scale_gem.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def disable_auto_scale_gem @disable_auto_scale_gem end |
#disable_sidekiq_metrics ⇒ Object
Returns the value of attribute disable_sidekiq_metrics.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def disable_sidekiq_metrics @disable_sidekiq_metrics end |
#metrics_server_auth_token ⇒ Object
Returns the value of attribute metrics_server_auth_token.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def metrics_server_auth_token @metrics_server_auth_token end |
#metrics_server_url ⇒ Object
Returns the value of attribute metrics_server_url.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def metrics_server_url @metrics_server_url end |
#process_type ⇒ Object
Returns the value of attribute process_type.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def process_type @process_type end |
#report_interval_seconds ⇒ Object
Returns the value of attribute report_interval_seconds.
5 6 7 |
# File 'lib/neetodeploy/autoscale/config.rb', line 5 def report_interval_seconds @report_interval_seconds end |
Instance Method Details
#deployment_name ⇒ Object
18 19 20 |
# File 'lib/neetodeploy/autoscale/config.rb', line 18 def deployment_name "#{app_name}-#{process_type}-deployment" end |
#gem_disabled? ⇒ Boolean
22 23 24 |
# File 'lib/neetodeploy/autoscale/config.rb', line 22 def gem_disabled? disable_auto_scale_gem == "true" end |
#sidekiq_metrics_disabled? ⇒ Boolean
26 27 28 |
# File 'lib/neetodeploy/autoscale/config.rb', line 26 def sidekiq_metrics_disabled? disable_sidekiq_metrics == "true" end |