Setup
Pipeline Initialization
- After successful installation, you can now create a cleanup pipeline in the Magento backend:
-
-
Navigate to
]
-
- Pipelines can get initialized in the following ways:
-
-
Manually with the backend
-
Manually with CLI commands
-
Automated with the heartbeat
-
- To further process the created pipeline, the following conditions must apply:
-
-
A message queue must get installed on the system. Either AMQP (Rabbit-MQ) or MySQL
-
A Magento consumer must get executed, which processes the pipelines
-
The heartbeat must get configured
-
Message Queue
- The following configurations are available in the main module:
-
-
Queue-Publisher
-
Queue-Consumer
-
Queue-Publisher
queue-publisher.xml
<publisher topic="pipeline.step.process">
<connection
name="amqp"
exchange="techdivision-process-pipelines"
disabled="false"
/>
<connection
name="db"
exchange="techdivision-process-pipelines-db"
disabled="true"
/>
</publisher>
Queue-Consumer
queue-consumer.xml
<consumer
name="pipeline.runner.amqp" queue="pipeline_process_steps"
connection="amqp"
handler="TechDivision\ProcessPipelines\Model\Runner::process"
/>
<consumer
name="pipeline.runner.db" queue="pipeline_process_steps"
connection="db"
handler="TechDivision\ProcessPipelines\Model\Runner::process"
/>
Depending on the installed message queue, the necessary connections can get set in |
Magento Consumer/Pipeline Runner
Pipeline Runner
At least one Magento consumer must now get started, which processes the pipeline(s). |
- Local this can get executed with the following command:
bin/magento queue:consumers:start pipeline.runner.ampq
- When using the MySQL MQ, the likewise provided runner can get started:
bin/magento queue:consumers:start pipeline.runner.db
|
Heartbeat
As the last step, the heartbeat must be executed to determine the next step to be processed and pass it to the running consumer with the message queue.
- With the following command, the pipeline heartbeat can get executed:
bin/magento pipeline:heartbeat