Class: HmxClient::Command::Task
Overview
Display and manage tasks in hmx
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#index ⇒ Object
task .
-
#purge ⇒ Object
task:purge.
Methods inherited from Base
#hmx, #initialize, #loadConfig!, namespace, #removeConfig, #storeConfig, #writeConfig
Methods included from Helpers
#display, #display_row, #display_tab, #display_table, #error, #getFromUser, #longest
Constructor Details
This class inherits a constructor from HmxClient::Command::Base
Instance Method Details
#index ⇒ Object
task
List all of the tasks
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hmx/command/task.rb', line 13 def index tasks = hmx.doGetAllTasks([]) objs = [] tasks.each do | t | task = hmx.doGetTask([t]) objs << task end headers = [ "TaskId", "TaskType", "TaskState", "GroupId" ] cols = [ "taskId", "taskType", "taskState", "group" ] display_table(objs, cols, headers) end |
#purge ⇒ Object
task:purge
Purge completed tasks
27 28 29 30 |
# File 'lib/hmx/command/task.rb', line 27 def purge hmx.doPurgeTasks([]) display "Purge complete" end |