mcfedr / beanstalk-queue-driver-bundle
A bundle for managing job queues
Installs: 2 218
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5
- mcfedr/queue-manager-bundle: ^5.0
- pda/pheanstalk: ^3.1.0
- symfony/symfony: ^2.8|^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.1
- phpunit/phpunit: ^4.1
- symfony/monolog-bundle: ^2.8|^3.0
README
A driver for Queue Manager Bundle that uses beanstalkd
Usage
The beanstalk runner is a Symfony command. You can runner multiple instances if you need to handle higher numbers of jobs.
./bin/console mcfedr:queue:{name}-runner
Where {name}
is what you used in the config. Add -v
or more to get detailed logs.
Install
Composer
php composer.phar require mcfedr/beanstalk-queue-driver-bundle
AppKernel
Include the bundle in your AppKernel
public function registerBundles()
{
$bundles = array(
...
new Mcfedr\BeanstalkQueueDriverBundle\McfedrBeanstalkQueueDriverBundle(),
Config
With this bundle installed you can setup your queue manager config similar to this:
mcfedr_queue_manager:
managers:
default:
driver: beanstalkd
options:
host: 127.0.0.1
port: 11300
default_queue: mcfedr_queue
Options to QueueManager::put
queue
- The name of the queue to put the job inpriority
- The job priorityttr
- Beanstalk Time to run, the time given for a job to finish before it is repeatedtime
- A\DateTime
object of when to schedule this jobdelay
- Number of seconds from now to schedule this job