mugoweb / queue-bundle
Queue system for Ibexa
Installs: 152
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 8
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.4
- enqueue/enqueue-bundle: ^0.10.19
This package is auto-updated.
Last update: 2024-12-08 17:04:31 UTC
README
You first need to decide which transporter you would like to use. There are several options: https://php-enqueue.github.io/transport For example, you want to use the file system to store the queue, you would need to install the enqueue package for that transporter
composer require enqueue/fs
Configure the transporter by either setting the environment variable or directly change the configuration file 'config/packages/enqueue.yaml'
Set the ENQUEUE_DSN variable to
ENQUEUE_DSN=file:
It will store the queue in the system temporary directory.
Commands
# To produce messages:
./bin/console mugo:queue:produce <processor>
# To process messages:
./bin/console enqueue:transport:consume <processor>
# To clear queue:
./bin/console mugo:queue:purge <processor>
Creating a new Queue
Create queue service class
Configure queue service class
MugoWeb\QueueBundle\Queue\ExampleProcessor:
tags:
- { name: 'enqueue.transport.processor', processor: 'example_processor' }