Class: Jets::CLI::Maintenance::Worker::Restorer

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/cli/maintenance/worker/restorer.rb

Instance Attribute Summary

Attributes inherited from Base

#s3_bucket

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #lambda_functions, #state_file

Methods included from Lambda::Functions

#lambda_functions

Methods inherited from Base

#initialize, #paginate, #paging_params, rescue_api_error

Methods included from Util::Logging

#log

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

#output_value, #stack_exists?

Methods included from AwsServices::GlobalMemoist

included, #reset_cache!

Methods included from Api

#api, #api_key

Constructor Details

This class inherits a constructor from Jets::CLI::Maintenance::Worker::Base

Instance Method Details

#restore_concurrency_settingsObject



3
4
5
6
7
8
9
10
# File 'lib/jets/cli/maintenance/worker/restorer.rb', line 3

def restore_concurrency_settings
  data = read_from_s3
  data.each do |function_name, settings|
    lambda_function = Jets::CLI::Lambda::Function.new(function_name)
    lambda_function.reserved_concurrency = settings["reserved_concurrency"] if settings["reserved_concurrency"]
    lambda_function.provisioned_concurrency = settings["provisioned_concurrency"] if settings["provisioned_concurrency"]
  end
end