adt / background-queue-symfony
Background queue for Symfony using RabbitMQ.
v1.1.2
2023-09-25 15:19 UTC
Requires
- php: ^7.4
- adt/background-queue: ^4.16
- symfony/framework-bundle: ^4.4
- symfony/proxy-manager-bridge: ^4.4
README
1.1 Installation
composer require adt/background-queue-symfony
1.2 Configuration
return [ ADT\BackgroundQueueSymfony\Bundle\BackgroundQueueBundle::class => ['all' => true] ];
background_queue: callbacks: sendEmail: ['@App\Model\Mailer', 'sendEmail'] notifyOnNumberOfAttempts: 5 tempDir: '%tmp_dir%' locksDir: '%kernel.project_dir%/data/locks' connection: '%env(DATABASE_URL)%' queue: '%env(PROJECT_NAME)%' logger: '@logger' onBeforeProcess: ['@App\Model\Database', 'switchDatabase'] onError: ['ADT\Utils\Guzzle', 'handleException'] onAfterProcess: ['@App\Model\Database', 'switchDatabaseBack']
1.3 RabbitMQ (optional)
1.3.1 Installation
How to install RabbitMQ, check https://github.com/AppsDevTeam/background-queue
1.3.2 Configuration
background_queue: producer: '@ADT\BackgroundQueue\Broker\AmqpLib\Producer' waitingJobExpiration: 1000