Skip to content

ProcessQueue

github-actions edited this page Apr 22, 2026 · 1 revision

Executes queued processes sequentially while supporting detached entries and optional failure suppression.

Regular processes are executed in the order they were added and block the queue until completion. Detached processes are started in the order they were added but do not block subsequent entries.

A detached process that starts successfully is considered dispatched. Because this implementation does not wait for detached processes to finish during run(), their eventual runtime exit status cannot be incorporated into the final queue result. However, a detached process that cannot be started at all is treated as a startup failure and MAY affect the final status code unless its failure is explicitly configured to be ignored.

Buffered detached output is flushed only after the blocking portion of the queue has finished, which keeps later process output from interleaving with currently running blocking commands.


Methods

__construct

public __construct(\FastForward\DevTools\Console\Output\GithubActionOutput $githubActionOutput): mixed

Parameters:

Parameter Type Description
$githubActionOutput \FastForward\DevTools\Console\Output\GithubActionOutput wraps grouped queue output in GitHub Actions logs when supported

add

Adds a process to the queue.

public add(\Symfony\Component\Process\Process $process, bool $ignoreFailure = false, bool $detached = false, ?string $label = null): void

Parameters:

Parameter Type Description
$process \Symfony\Component\Process\Process the process instance that SHALL be added to the queue
$ignoreFailure bool indicates whether a failure of this process MUST NOT affect the final queue result
$detached bool indicates whether this process SHALL be started without blocking the next queued process
$label ?string an optional label that MAY be used to present the process output as a grouped block

run

Runs the queued processes and returns the resulting status code.

public run(\Symfony\Component\Console\Output\OutputInterface $output = new \Symfony\Component\Console\Output\NullOutput()): int

The returned status code represents the first non-zero exit code observed among non-ignored blocking processes, or among non-ignored detached processes that fail to start. Detached processes that start successfully are not awaited iteratively inside run() and therefore do not contribute their eventual runtime exit code to the returned result.

Parameters:

Parameter Type Description
$output \Symfony\Component\Console\Output\OutputInterface the output used during execution

Return Value:

the final exit status code produced by the queue execution


wait

Waits for detached processes to finish and flushes completed buffered output.

public wait(?\Symfony\Component\Console\Output\OutputInterface $output = null): void

Parameters:

Parameter Type Description
$output ?\Symfony\Component\Console\Output\OutputInterface the output interface to which process output and diagnostics MAY be written

Clone this wiki locally