require 'workers/stack_sync_worker' require_relative "request_handler" module Devops module API2_0 module Handler class ProviderNotification < RequestHandler def autoscaling_groups_change(group_id, provider_account) provider = ::Provider::ProviderFactory.get('ec2', provider_account) stack_id = provider.stack_id_of_autoscaling_group(group_id) stack = ::Devops::Db.connector.stack_by_id(stack_id) jid = Worker.start_async(StackSyncWorker, stack_name: stack.name) puts jid jid end end end end end