Class: Agent::Lock::CLI::Commands::Mine
- Defined in:
- lib/agent/lock/cli/commands/mine.rb
Overview
What this session holds, and what its sub-agents hold, since those
are what its release-all would take with it. Never its parent's:
a sub-agent that saw those as its own could release them.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Agent::Lock::CLI::Commands::Base
Instance Method Details
#call(**options) ⇒ Manager::Result
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/agent/lock/cli/commands/mine.rb', line 19 def call(**) manager = manager([:dir]) result = manager.mine if result.records.empty? say([:json] ? "[]" : "No locks held by #{manager.identity.id}.") else report_records(result.records, json: [:json], stale_minutes: manager.stale_minutes) end finish(result) end |