litgroup/gearman-bundle

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

Gearman Job Server API integration for Symfony 2

Installs: 29

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Type:symfony-bundle

v0.1.0 2013-08-11 16:48 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:26:16 UTC


README

🚫 (This project is no longer maintained.)

Simpliest Gearman php-extension integration with Dependency Injection Container of Symfony 2

Installation

Before installation

At first you should install PECL Extension for Gearman. See instruction here.

Installation with Composer

{
    "require": {
        "litgroup/gearman-bundle": "dev-master"
    }
}

Enable bundle in the AppKernel

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new LitGroup\Bundle\GearmanBundle\LitGroupGearmanBundle(),
        );

        // ...
        
        return $bundles;
    }

    // ...
}

Configuration

With empty configuration localhost server will be used on default port.

You can also specify the list of servers. Look on examples for yaml, xml and php configurations:

lit_group_gearman:
    servers:
        - "10.0.0.1"
        - "10.0.0.2:4703" # Specify the port
<gearman:config
        xmlns:gearman="http://litgroup.ru/schema/dic/gearman"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://litgroup.ru/schema/dic/gearman http://litgroup.ru/schema/dic/gearman/gearman-1.0.xsd">

    <gearman:servers>
        <gearman:server>10.0.0.1:4703</gearman:server>
        <gearman:server>10.0.0.2:4703</gearman:server>
    </gearman:servers>

</gearman:config>
$container->loadFromExtension('lit_group_gearman', [
    'servers' => [
        '10.0.0.1:4703',
        '10.0.0.2:4703',
    ]
]);

Usage

Bundle provides two services available in container.

  • litgroup_gearman.clientGearmanClient class;
  • litgroup_gearman.workerGearmanWorker class.

License

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

Resources/meta/LICENSE

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

Pull request should be sent for develop branch.