PHPackages                             hosopy/fuel-jobqueue - 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. hosopy/fuel-jobqueue

ActiveFuel-package

hosopy/fuel-jobqueue
====================

FuelPHP Jobqueue Package

5751↓100%2[2 issues](https://github.com/hosopy/fuel-jobqueue/issues)PHP

Since Sep 11Pushed 12y ago3 watchersCompare

[ Source](https://github.com/hosopy/fuel-jobqueue)[ Packagist](https://packagist.org/packages/hosopy/fuel-jobqueue)[ RSS](/packages/hosopy-fuel-jobqueue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

fuel-jobqueue
=============

[](#fuel-jobqueue)

Jobqueue package for FuelPHP.

Requirements
------------

[](#requirements)

- PHP 5.3.3+
- [symfony/Process](https://github.com/symfony/Process) 2.3
- [pda/pheanstalk](https://github.com/pda/pheanstalk)
- [beanstalkd](http://kr.github.io/beanstalkd/)

Installation
------------

[](#installation)

### A: Using composer

[](#a-using-composer)

Add required package to your `composer.json`.

```
    ...
    "require": {
        ...
        "hosopy/fuel-jobqueue": "dev-master",
        ...
    },
    ...
```

And run composer installer.

```
$ php composer.phar install

```

### B: Manual

[](#b-manual)

Download zip archive or clone this repository, and extract to `fuel/app/packages/fuel-jobqueue`.

Usage
-----

[](#usage)

### 1. Enable package

[](#1-enable-package)

```
'always_load' => array(
    'packages' => array(
        'fuel-jobqueue',
        ...
```

### 2. Configuration

[](#2-configuration)

Copy default configuration file to your app/config directory.

```
$ cp fuel/packages/fuel-jobqueue/config/jobqueue.php fuel/app/config

```

If you want to run beanstalkd in other machine or port, edit configuration.

For the moment, keep default configuration.

```
return array(
    // default connection name
    'default' => 'default_connection',

    'connections' => array(
        'default_connection' => array(
            'driver'   => 'beanstalkd',
            'host'     => '127.0.0.1',
            'port'     => '11300',
            'queue'    => 'jobqueue',
        ),
    ),
);
```

### 3. Install and run beanstalkd

[](#3-install-and-run-beanstalkd)

Currently, fuel-jobqueue uses [beanstalkd](http://kr.github.io/beanstalkd/) as a backend of queueing.

If beanstalkd is not installed in your machine, install it first.

```
# Example: homebrew (Mac)
$ brew install beanstalkd
$ beanstalkd

```

```
# Example: Ubuntu
$ sudo apt-get install beanstalkd

```

If you want to know about beanstalkd more, see [](https://github.com/kr/beanstalkd).

### 4. Define Job

[](#4-define-job)

Define your job handler class in `fuel/app/classes/myjob.php`.

```
