Class: Dash::Cli::Lock
Constant Summary
Constants inherited from Base
Base::AUTOMATIC_DEPLOY_LOCK_MESSAGE, Base::HOOK_MUTEX, Base::VERBOSITY
Instance Method Summary collapse
Methods inherited from Base
dynamic_command_class, exit_on_failure?, #initialize
Constructor Details
This class inherits a constructor from Dash::Cli::Base
Instance Method Details
#acquire ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/dash/cli/lock.rb', line 16 def acquire ensure_run_directory raise_if_locked do execute_lock_acquire([:message]) say "Acquired the deploy lock" end end |
#release ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/dash/cli/lock.rb', line 27 def release if [:server] release_server_lock_on(server_lock_hosts) say "Released the server lock" else handle_missing_lock do execute_lock_release say "Released the deploy lock" end end end |
#status ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/dash/cli/lock.rb', line 4 def status if [:server] report_server_lock_status else handle_missing_lock do puts capture_lock_status end end end |