Download the PHP package laelaps/symfony-gearman-bundle without Composer
On this page you can find all versions of the php package laelaps/symfony-gearman-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laelaps/symfony-gearman-bundle
More information about laelaps/symfony-gearman-bundle
Files in laelaps/symfony-gearman-bundle
Package symfony-gearman-bundle
Short Description Integrates Gearman into Symfony
License MIT
Homepage https://github.com/laelaps/symfony-gearman-bundle
Informations about the package symfony-gearman-bundle
Symfony Gearman Bundle
Wrapper for Gearman so that you get command lines tools and can use annotation in Symfony.
Also supports the Symfony web profiling toolbar integration.
Installation
composer.json
config.yml
We can configure one server for the client. Because only one is used. You need load balancer if you would like to share the load over multiple Gearman servers.
We can configure multiple servers for the workers. Because they do look for work on all configured Gearman servers.
app/AppKernel.php
Worker supervisor cron tool
There is a simple supervisor bash script available. For instructions, see:
https://github.com/laelaps/symfony-gearman-bundle/issues/2#issuecomment-16257507
Examples
Worker
Running worker
Symfony Style Notation
Note that this would look for Acme\Bundle\AcmeBundle\Worker\ExampleWorker
Wildcard is also available (not recommended but possible - results in single process for multiple workers):
Runs all workers from all bundles:
Calling job from controller
Calling job from command line
Consumer (alternative implementation for Worker)
As an alternative to the Worker implementation, there is a Consumer-Handler implementation.
place jobs on the queue with:
write a handler like:
And add this class to your service container with a tag:
and run it with:
All versions of symfony-gearman-bundle with dependencies
php Version >=5.3.0
symfony/console Version >=2.1
symfony/framework-bundle Version >=2.1