Skip to content

Commit

Permalink
Merge pull request #45 from rererecursive/master
Browse files Browse the repository at this point in the history
Only stop ECS services of scheduling type Replica.
  • Loading branch information
Guslington authored May 28, 2019
2 parents 6f01b15 + a980107 commit d7e80f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cfn_manage/ecs_cluster_start_stop_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def initialize(cluster_id, skip_wait)
credentials = CfnManage::AWSCredentials.get_session_credentials("stoprun_#{cluster_id}")
@ecs_client = Aws::ECS::Client.new(credentials: credentials, retry_limit: 20)
@services = []
@ecs_client.list_services(cluster: cluster_id, max_results: 100).each do |results|
@ecs_client.list_services(cluster: cluster_id, scheduling_strategy: 'REPLICA', max_results: 100).each do |results|
@services.push(*results.service_arns)
end
$log.info("Found #{@services.count} services in ECS cluster #{cluster_id}")
Expand Down

0 comments on commit d7e80f0

Please sign in to comment.