Executor
-
An executor is the executive body of a pipeline step
-
The pipeline defines the type of implementation of the executor
delete_pipeline_data
step vendor/techdivision/process-pipelines/etc/pipeline.xml
<step name="delete_pipeline_data" executorType="TechDivision\ProcessPipelines\Model\Executor\DeleteExecutor" sortOrder="20" description="" >
...
</step>
-
The logic of an executor gets contained in the function
process
-
Only the
\TechDivision\ProcessPipelines\Api\ExecutorInterface
has to get implemented -
The stored type of the executor (XML) gets passed to the message queue with the argument list
-
The message queue forwards the classified messages with the info to the PipelineRunner (Consumer), which selects and executes the executor’s implementation based on the provided information
TechDivision\ProcessPipelines\Model\Executor\CompressExecutor
<?php
public function process(StepInterface $step)
{
$compressTime = $this->getCompareTime(
ConfigInterface::CONFIG_PATH_CLEAN_UP_COMPRESS
);
$fileListToCompress = $this->getDirListOlderThenCompareTime($compressTime);
...
foreach ($fileListToCompress as $folderToCompress) {
if ($this->hasFiles($folderToCompress) === false) {
...
$this->delete($folderToCompress);
continue;
}
...
$this->archive($folderToCompress);
}
}
Abstract executor classes
Classname | Description |
---|---|
|
|
|
|
|
Implemented executor models
Classname | Description |
---|---|
|
|
|
|
|
|
|
|
|