Class: Jets::CLI::Maintenance::Worker::Zeroer
- Defined in:
- lib/jets/cli/maintenance/worker/zeroer.rb
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #lambda_functions, #state_file
Methods included from Lambda::Functions
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::Worker::Base
Instance Method Details
#all_zeroed? ⇒ Boolean
11 12 13 14 15 16 17 |
# File 'lib/jets/cli/maintenance/worker/zeroer.rb', line 11 def all_zeroed? lambda_functions.all? do |lambda_function| # check both reserved and provisioned lambda_function.provisioned_concurrency_unset? && lambda_function.reserved_concurrency_zero? end end |
#zero_all_concurrency ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/jets/cli/maintenance/worker/zeroer.rb', line 3 def zero_all_concurrency lambda_functions.each do |lambda_function| # must zero provisioned before reserved lambda_function.provisioned_concurrency = nil lambda_function.reserved_concurrency = 0 end end |