2017 © Pedro Peláez
 

library php_gearman_daemons

PHP Gearman Deamon Manager

image

aporat/php_gearman_daemons

PHP Gearman Deamon Manager

  • Wednesday, May 22, 2013
  • by aporat
  • Repository
  • 1 Watchers
  • 10 Stars
  • 93 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP Gearman Daemons Manager

Build Status Dependency Status Coverage Status, (*1)

The PHP Gearman Daemons Manager library allows running gearman workers as deamons using supervisord or using a built it php process manager. The library is framework independent and can be easily integrated into any project., (*2)

Requirements

  • PHP >= 5.3

Getting Started

The easiest way to work with this package is when it's installed as a Composer package inside your project. Composer isn't strictly required, but makes life a lot easier., (*3)

If you're not familiar with Composer, please see http://getcomposer.org/., (*4)

  1. Add php_gearman_daemons to your application's composer.json., (*5)

    {
        ...
        "require": {
            "aporat/php_gearman_daemons": "dev-master"
        },
        ...
    }
  2. Run php composer install., (*6)

  3. If you haven't already, add the Composer autoload to your project's initialization file. (example), (*7)

    require 'vendor/autoload.php';

Quick Example


<?php use \GearmanDaemons\WorkerAbstract; class Worker_DoPrint extends WorkerAbstract { protected $_registerFunction = 'DoPrint'; protected function _perform() { $body = unserialize($this->getWorkload()); echo 'Printing...'; } }

Gearman/PHP Install (CentOS / Amazon Linux AMI)

    yum -y install gcc* mysql55-devel boost-devel libevent-devel libuuid-devel

    wget https://launchpad.net/gearmand/1.2/1.1.4/+download/gearmand-1.1.4.tar.gz
    tar zxvf gearmand-1.1.4.tar.gz 
    cd gearmand-1.1.4 &&  ./configure && make && make install

    pecl install gearman
    echo "extension=gearman.so" >> /etc/php.ini

    pecl install proctitle
    echo "extension=proctitle.so" >> /etc/php.ini

    yum install python-setuptools
    easy_install supervisor
    echo_supervisord_conf > /etc/supervisord.conf 

The Versions

22/05 2013

dev-master

9999999-dev https://github.com/aporat/PHP-GearmanDaemons

PHP Gearman Deamon Manager

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

queues gearman workers deamons

22/05 2013