Customizable stop wait time
Configurable via a global `stop_wait_time` option. The default is `10` which matches Docker defaults.
This commit is contained in:
@@ -27,10 +27,12 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
|
||||
docker :start, service_with_version_and_destination_and_role
|
||||
end
|
||||
|
||||
DEFAULT_STOP_WAIT_TIME = 10
|
||||
|
||||
def stop(version: nil)
|
||||
pipe \
|
||||
version ? container_id_for_version(version) : current_container_id,
|
||||
xargs(docker(:stop))
|
||||
xargs(docker(:stop, "-t", config.stop_wait_time || DEFAULT_STOP_WAIT_TIME))
|
||||
end
|
||||
|
||||
def info
|
||||
|
||||
@@ -6,7 +6,8 @@ require "erb"
|
||||
require "net/ssh/proxy/jump"
|
||||
|
||||
class Mrsk::Configuration
|
||||
delegate :service, :image, :servers, :env, :labels, :registry, :builder, to: :raw_config, allow_nil: true
|
||||
delegate :service, :image, :servers, :env, :labels, :registry, :builder, :stop_wait_time,
|
||||
to: :raw_config, allow_nil: true
|
||||
delegate :argumentize, :argumentize_env_with_secrets, to: Mrsk::Utils
|
||||
|
||||
attr_accessor :destination
|
||||
|
||||
Reference in New Issue
Block a user