Skip to content

Latest commit

 

History

History
117 lines (82 loc) · 3.28 KB

installation.rst

File metadata and controls

117 lines (82 loc) · 3.28 KB

Installation

Installing JMSJobQueueBundle

You can easily install JMSJobQueueBundle with composer. Just run:

composer require olaldennis/job-queue-bundle

Next you need to update your bundles.php file, and register the new bundle. If you are in Symfony 4 and above the bundle will automatically be registered using Symfony Flex:

Have your bin/console use JMSJobQueueBundle's Application:

Finally, run make migration and migrations migrate:

Enabling the Webinterface

If you also want to use the webinterface where you can view the outputs, and exception stack traces for your jobs, you need to add the following to your

routing.yml:

Then, update your dependencies using

And add the JMSDiExtraBundle and JMSAopBundle to your config/bundles.php:

Typically, you would also want to add some access control restrictions for these actions. If you are using JMSSecurityExtraBundle this could look like this:

This will require the user to have the role ROLE_ADMIN if he wants to access any action from this bundle.

Setting Up supervisord

For this bundle to work, make sure that you run at least one instance of the console command jms-job-queue:run (you can run as many as needed to process your events or guarantee high availability).

Below, is a sample configuration that you can use with supervisord: