PHPackages                             horrible/gearman-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. horrible/gearman-bundle

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

horrible/gearman-bundle
=======================

Horrible gearman bundle

1.0.2(10y ago)037MITPHPPHP &gt;=5.6 || &gt;=7.0

Since May 30Pushed 9y ago1 watchersCompare

[ Source](https://github.com/pandanotbreathing/gearman-bundle)[ Packagist](https://packagist.org/packages/horrible/gearman-bundle)[ RSS](/packages/horrible-gearman-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (8)Used By (0)

Horrible Gearman Bundle Documentation
=====================================

[](#horrible-gearman-bundle-documentation)

[![Travis Build Status](https://camo.githubusercontent.com/bbbd650edf5b23eae51f191629d35fb640a5f76b0d0ec03f220a01e58f05ffaa/68747470733a2f2f7472617669732d63692e6f72672f70616e64616e6f74627265617468696e672f676561726d616e2d62756e646c652e7376673f6272616e63683d66656174757265253246747261766973)](https://camo.githubusercontent.com/bbbd650edf5b23eae51f191629d35fb640a5f76b0d0ec03f220a01e58f05ffaa/68747470733a2f2f7472617669732d63692e6f72672f70616e64616e6f74627265617468696e672f676561726d616e2d62756e646c652e7376673f6272616e63683d66656174757265253246747261766973)

[![Coverage Status](https://camo.githubusercontent.com/28d24c4d69e94e0c23431424dcbbad49ba247f0aa627b25126dbe230717f1e0b/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f70616e64616e6f74627265617468696e672f676561726d616e2d62756e646c652f62616467652e7376673f6272616e63683d646576656c6f706d656e74)](https://coveralls.io/github/pandanotbreathing/gearman-bundle?branch=development)

Configuration
-------------

[](#configuration)

1. **Add following configuration to your config.yml:**

    ```
    horrible_gearman: 
        servers: 
            - { host: '127.0.0.1' } 
            - { host: '127.0.0.1', port: '47031' } 
        retries: 3

    ```

    - servers - an array of the gearman servers, you can ignore 'port' field, gearman's default port will be used.
    - retries - amount of retries if exception would be thrown from Job
2. **Add bundle initialization to the app/AppKernel.php**

    ```
    class AppKernel extends Kernel
    {
        public function registerBundles()
        {
            $bundles = [
                ...
                new Horrible\GearmanBundle\HorribleGearmanBundle(),
            ];
        }
        ...
    }

    ```
3. **Create your own Job implemeting JobInterface. It's important to give your job name (so you can access your job through client using this job name). Also implement your 'execute' method where you can get WorkloadInterface instance.**

    ```
