Only stopping containers locks
This commit is contained in:
@@ -135,11 +135,9 @@ class Kamal::Cli::App < Kamal::Cli::Base
|
||||
desc "stale_containers", "Detect app stale containers"
|
||||
option :stop, aliases: "-s", type: :boolean, default: false, desc: "Stop the stale containers found"
|
||||
def stale_containers
|
||||
mutating do
|
||||
stop = options[:stop]
|
||||
|
||||
cli = self
|
||||
stop = options[:stop]
|
||||
|
||||
mutating(mutates: stop) do
|
||||
on(KAMAL.hosts) do |host|
|
||||
roles = KAMAL.roles_on(host)
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@ module Kamal::Cli
|
||||
puts " Finished all in #{sprintf("%.1f seconds", runtime)}"
|
||||
end
|
||||
|
||||
def mutating
|
||||
return yield if KAMAL.holding_lock?
|
||||
def mutating(mutates: true)
|
||||
return yield if KAMAL.holding_lock? || !mutates
|
||||
|
||||
run_hook "pre-connect"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user