Bug #32050
closedBatchRunnerAction collect broadcasted output even if it has no use for it
Description
When ansible runner is used, then for each batch we have the following task structure on the smart proxy:
- 1 ForemanTasksCore::SingleRunnerBatchAction - a single parent task covering the batch
- 1 ForemanTasksCore::BatchRunnerAction - a single action running ansible-runner and dispatching updates to other actions
- N ForemanTasksCore::OutputCollectorAction - these just collect outputs from BatchRunnerAction to maintain one to one mapping between tasks in foreman and on the proxy. one for each host in the job
We distinguish two kinds of outputs - per-host and broadcast. Broadcast outputs are sent to all OutputCollectorAction, per-host are sent only to a specific OutputCollectorAction belonging to the given host. For some reason, BatchRunnerAction collects broadcasted outputs, although they are never consumed anywhere and just lead to unnecessary db writes and bloat.