Sha256: 98495a387e823fe69115641dd2ee2e8f71c5e2b539b01b9e2ff0a38d7edfd968
Contents?: true
Size: 965 Bytes
Versions: 20
Compression:
Stored size: 965 Bytes
Contents
require 'shipitron' require 'shipitron/ecs_client' module Shipitron module Server module EcsTaskDefs class UpdateFromParams include Metaractor include EcsClient required :region required :ecs_task_defs def call ecs_task_defs.each do |ecs_task_def| next if ecs_task_def.params.nil? ecs_task_def.revision = ecs_client(region: region).register_task_definition( ecs_task_def.params.to_h ).task_definition.revision Logger.info "Created task definition #{ecs_task_def}" end rescue Aws::ECS::Errors::ServiceError => e fail_with_errors!(messages: [ "Error: #{e.message}", e.backtrace.join("\n") ]) end private def region context.region end def ecs_task_defs context.ecs_task_defs end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems