Improved deploy lock acquisition
1. Don't raise lock error for non-lock issues during lock acquire (see https://github.com/mrsked/mrsk/pull/181) 2. If there is an error while the lock is held, don't release the lock and send a warning to stderr
This commit is contained in:
@@ -12,7 +12,7 @@ class Mrsk::Cli::Lock < Mrsk::Cli::Base
|
||||
message = options[:message]
|
||||
handle_missing_lock do
|
||||
on(MRSK.primary_host) { execute *MRSK.lock.acquire(message, MRSK.config.version) }
|
||||
say "Set the deploy lock"
|
||||
say "Acquired the deploy lock"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ class Mrsk::Cli::Lock < Mrsk::Cli::Base
|
||||
def release
|
||||
handle_missing_lock do
|
||||
on(MRSK.primary_host) { execute *MRSK.lock.release }
|
||||
say "Removed the deploy lock"
|
||||
say "Released the deploy lock"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user