Class: Agent::Lock::CLI::Commands::Resume
- Inherits:
-
TreeCommand
- Object
- Dry::CLI::Command
- Base
- TreeCommand
- Agent::Lock::CLI::Commands::Resume
- Defined in:
- lib/agent/lock/cli/commands/resume.rb
Overview
Pick up work a reboot or a crash interrupted.
A lock whose holder died is orphaned rather than deleted when it has notes in it. This takes it back, prints what the last session wrote, and makes it a live claim again under the current identity.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call(scope:, **options) ⇒ Manager::Result
:resumed, :not_found, :held or :interrupted.
Methods inherited from TreeCommand
Methods inherited from Base
Constructor Details
This class inherits a constructor from Agent::Lock::CLI::Commands::Base
Instance Method Details
#call(scope:, **options) ⇒ Manager::Result
Returns :resumed, :not_found, :held or :interrupted.
24 25 26 27 28 29 |
# File 'lib/agent/lock/cli/commands/resume.rb', line 24 def call(scope:, **) manager = manager() result = manager.resume(scope) report(result, scope, manager.stale_minutes) finish(result) end |