WebUI Actions - abrt/faf GitHub Wiki

Problem statement

  • Be able to start, stop, schedule and monitor FAF actions using the web UI.
  • Actions can possibly take tens of hours to complete.
  • Current functionality to run actions via command-line and schedule using Cron must not be disrupted.
  • Doesn't necessarily need to support RHEL 6, however it must not be disrupted.

Solution

Use the Celery task queue.

Actions preparation

  • Create a generic Celery task that runs a specified action.
  • Pass actions parameters a mock command-line options.
  • Create a mock CmdlineParser class that creates a web form and mock command-line parameters so that current tweak_cmdline_parser code can be used as-is.
  • If necessary, allow actions to create their own web forms.
  • Create a logger that saves the results somewhere. I may be useful to add a custom log level, such as log_result, and some progress info.

Task management