Class: Jets::CLI::Maintenance::Worker
- Defined in:
- lib/jets/cli/maintenance/worker.rb,
lib/jets/cli/maintenance/worker/base.rb,
lib/jets/cli/maintenance/worker/saver.rb,
lib/jets/cli/maintenance/worker/zeroer.rb,
lib/jets/cli/maintenance/worker/restorer.rb
Defined Under Namespace
Classes: Base, Restorer, Saver, Zeroer
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Util::Truthy
Methods included from Lambda::Checks
#check_deployed!, #check_workers!, #workers_deployed?
Methods inherited from Base
#initialize, #paginate, #paging_params, rescue_api_error
Methods included from Util::Logging
Methods included from AwsServices
#apigateway, #aws_options, #cfn, #codebuild, #dynamodb, #lambda_client, #logs, #s3, #s3_resource, #sns, #sqs, #ssm, #sts, #wafv2
Methods included from AwsServices::StackStatus
Methods included from AwsServices::GlobalMemoist
Methods included from Api
Constructor Details
This class inherits a constructor from Jets::CLI::Maintenance::Base
Instance Method Details
#off ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/jets/cli/maintenance/worker.rb', line 15 def off check_workers! if on? Restorer.new(@options).restore_concurrency_settings warn "Worker maintenance has been turned off" else warn "Worker maintenance is already off" end end |
#on ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/jets/cli/maintenance/worker.rb', line 3 def on check_workers! if on? warn "Worker maintenance is already on" else Saver.new(@options).save_concurrency_settings Zeroer.new(@options).zero_all_concurrency warn "Worker maintenance has been turned on" end end |