scribe/pheanstalk-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

The ScribePheanstalkBundle is a Symfony2 Bundle that provides a command line interface for manage the Beanstalkd workqueue server & a pheanstalk integration.

Installs: 256

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 5

Forks: 42

Type:symfony-bundle

2.2.1 2013-10-23 01:51 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:27:51 UTC


README

Beanstalkd workqueue clients for Symfony2.

The ScribePheanstalkBundle 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("scribe.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.

Credits

Author - Thomas Tourlourat

Contributor :