Bundle for Pheanstalk - A PHP client for beanstalkd queue
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitignore
.travis.yml
CHANGELOG.md
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

LeezyPheanstalkBundle

Build Status Packagist Scrutinizer Quality Score

Beanstalkd workqueue clients for Symfony2.

The LeezyPheanstalkBundle is a Symfony2 Bundle that provides a pheanstalk integration with the following features:

  • Command Line Interface for manage the queues.
  • An integration to the Symfony2 event system.
  • An integration to the Symfony2 profiler system to monitor your beanstalk server.
  • An integration to the Symfony2 logger system.
  • A proxy system to customize the command features.

Documentation :

Usage example

<?php

namespace Acme\DemoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class HomeController extends Controller {

    public function indexAction() {
        $pheanstalk = $this->get("leezy.pheanstalk");

        // ----------------------------------------
        // producer (queues jobs)

        $pheanstalk
          ->useTube('testtube')
          ->put("job payload goes here\n");

        // ----------------------------------------
        // worker (performs jobs)

        $job = $pheanstalk
          ->watch('testtube')
          ->ignore('default')
          ->reserve();

        echo $job->getData();

        $pheanstalk->delete($job);
    }

}
?>

Testing

$ php composer.phar update
$ phpunit

License

This bundle is under the MIT license. See the complete license.

Other

Silex integration

Credits

Author - Thomas Tourlourat

Contributor :