Class: Mrsk::Cli::Lock
- Inherits:
-
Base
- Object
- Thor
- Base
- Mrsk::Cli::Lock
show all
- Defined in:
- lib/mrsk/cli/lock.rb
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?, #initialize
Instance Method Details
#acquire ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/mrsk/cli/lock.rb', line 11
def acquire
message = options[:message]
raise_if_locked do
on(MRSK.primary_host) { execute *MRSK.lock.acquire(message, MRSK.config.version), verbosity: :debug }
say "Acquired the deploy lock"
end
end
|
#release ⇒ Object
20
21
22
23
24
25
|
# File 'lib/mrsk/cli/lock.rb', line 20
def release
handle_missing_lock do
on(MRSK.primary_host) { execute *MRSK.lock.release, verbosity: :debug }
say "Released the deploy lock"
end
end
|
#status ⇒ Object
3
4
5
6
7
|
# File 'lib/mrsk/cli/lock.rb', line 3
def status
handle_missing_lock do
on(MRSK.primary_host) { puts capture_with_debug(*MRSK.lock.status) }
end
end
|