Runners are the foundations of the Worker, every task is executed via a runner.
Runners are stored in the RunnerRegistry, you can easily find a runner regarding
the task that you want to execute using find()
or even filter the runners regarding a specific condition using
filter()
.
Runner | Description |
---|---|
CallbackTaskRunner |
Execute every CallbackTask thanks to call_user_func_array |
ChainedTaskRunner |
Execute every ChainedTask , the whole "sub-tasks" list is executed |
CommandTaskRunner |
Execute every CommandTask , the Application is used |
HttpTaskRunner |
Execute every HttpTask , if the http client is not available, the task is not executed |
MessengerTaskRunner |
Execute every MessengerTask , if the bus is not available, the task is not executed |
NotificationTaskRunner |
Execute every NotificationTask , if the notifier is not available, the task is not executed |
NullTaskRunner |
Execute every NullTask , return an output without any further action |
ShellTaskRunner |
Execute every ShellTask using Process |
Defining a new runner is as simple as it sounds, just implement RunnerInterface and define implementations for each method, once this is done, the runner will be tagged and injected in the RunnerRegistry.