Low commit activity in last 3 years
A long-lived project that still receives updates
Contains the code for showing of the tasks (results and progress) in the Hammer CLI.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

> 0.1.1, < 4.0.0
>= 1.0.11, < 3.0
 Project Readme

Hammer CLI Foreman Tasks

Showing of the tasks (results and progress) in the Hammer CLI.

Allows waiting for async task after the task was triggered.

Usage:

class MyAsyncCommand < HammerCLIForemanTasks::AsyncCommand
  action "run"
  command_name "run"

  success_message "Task started with id %{id}s"
  failure_message "Could not run the task"

  build_options
end

Also, there is HammerCLIForemanTasks::Helper with helper methods, if the AsyncCommand class doesn't fit for the case.

The AsyncCommand comes with --async option so that the command doesn't wait for the task to finish.

There is a task command with progress action available, showing the progress for action based on id.

Usage:

# wait for task to finish (showing the progress)
hammer task progress --id 1234-5678-7654-3210