Class: Pvectl::Commands::Get::Handlers::Tasks
- Inherits:
-
Object
- Object
- Pvectl::Commands::Get::Handlers::Tasks
- Includes:
- ResourceHandler
- Defined in:
- lib/pvectl/commands/get/handlers/tasks.rb
Overview
Handler for listing Proxmox tasks (async operations).
Implements ResourceHandler interface for the “tasks” resource type. Delegates to Services::TaskListing for multi-node task listing.
Instance Method Summary collapse
-
#initialize(service: nil) ⇒ Tasks
constructor
Creates handler with optional service for dependency injection.
-
#list(node: nil, name: nil, limit: 50, since: nil, until_time: nil, type_filter: nil, status_filter: nil, **_options) ⇒ Array<Models::TaskEntry>
Lists tasks with optional filtering.
-
#presenter ⇒ Presenters::TaskEntry
Returns presenter for task entries.
Methods included from ResourceHandler
Constructor Details
#initialize(service: nil) ⇒ Tasks
Creates handler with optional service for dependency injection.
26 27 28 |
# File 'lib/pvectl/commands/get/handlers/tasks.rb', line 26 def initialize(service: nil) @service = service end |
Instance Method Details
#list(node: nil, name: nil, limit: 50, since: nil, until_time: nil, type_filter: nil, status_filter: nil, **_options) ⇒ Array<Models::TaskEntry>
Lists tasks with optional filtering.
40 41 42 43 44 45 46 47 |
# File 'lib/pvectl/commands/get/handlers/tasks.rb', line 40 def list(node: nil, name: nil, limit: 50, since: nil, until_time: nil, type_filter: nil, status_filter: nil, **) service.list( node: node, vmid: nil, limit: limit, since: since, until_time: until_time, type_filter: type_filter, status_filter: status_filter ) end |
#presenter ⇒ Presenters::TaskEntry
Returns presenter for task entries.
52 53 54 |
# File 'lib/pvectl/commands/get/handlers/tasks.rb', line 52 def presenter Pvectl::Presenters::TaskEntry.new end |