Sha256: 2526be3440c59f23afd61d7e764b8cc6157fb2ac853db69e47a24ed157a17a68
Contents?: true
Size: 531 Bytes
Versions: 12
Compression:
Stored size: 531 Bytes
Contents
module Kontena module Callbacks class ClearCurrentMasterAfterTerminate < Kontena::Callback include Kontena::Cli::Common matches_commands 'master terminate' def after return unless command.exit_code == 0 return unless config.current_master ENV["DEBUG"] && $stderr.puts("Removing current master from config") config.servers.delete_at(config.find_server_index(config.current_master.name)) config.current_server = nil config.write end end end end
Version data entries
12 entries across 12 versions & 1 rubygems