{"id":15459081,"url":"https://github.com/hosopy/fuel-jobqueue","last_synced_at":"2025-10-06T04:23:06.845Z","repository":{"id":9284769,"uuid":"11118287","full_name":"hosopy/fuel-jobqueue","owner":"hosopy","description":"Jobqueue package for FuelPHP","archived":false,"fork":false,"pushed_at":"2013-09-11T06:02:44.000Z","size":185,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-18T19:30:14.190Z","etag":null,"topics":["fuelphp","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hosopy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-02T06:36:18.000Z","updated_at":"2023-01-17T06:01:18.000Z","dependencies_parsed_at":"2022-09-22T14:41:18.785Z","dependency_job_id":null,"html_url":"https://github.com/hosopy/fuel-jobqueue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hosopy%2Ffuel-jobqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hosopy%2Ffuel-jobqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hosopy%2Ffuel-jobqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hosopy%2Ffuel-jobqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hosopy","download_url":"https://codeload.github.com/hosopy/fuel-jobqueue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250221194,"owners_count":21394679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuelphp","php"],"created_at":"2024-10-01T23:04:33.085Z","updated_at":"2025-10-06T04:23:06.762Z","avatar_url":"https://github.com/hosopy.png","language":"PHP","readme":"fuel-jobqueue\n=============\n\nJobqueue package for FuelPHP.\n\n\n## Requirements ##\n\n* PHP 5.3.3+\n* [symfony/Process](https://github.com/symfony/Process) 2.3\n* [pda/pheanstalk](https://github.com/pda/pheanstalk)\n* [beanstalkd](http://kr.github.io/beanstalkd/)\n\n\n## Installation ##\n\n### A: Using composer ###\n\nAdd required package to your `composer.json`.\n\n```json\n    ...\n    \"require\": {\n        ...\n        \"hosopy/fuel-jobqueue\": \"dev-master\",\n        ...\n    },\n    ...\n```\n\nAnd run composer installer.\n\n```\n$ php composer.phar install\n```\n\n### B: Manual ###\n\nDownload zip archive or clone this repository, and extract to `fuel/app/packages/fuel-jobqueue`.\n\n\n## Usage ##\n\n### 1. Enable package ###\n\n```php\n'always_load' =\u003e array(\n    'packages' =\u003e array(\n        'fuel-jobqueue',\n        ...\n```\n\n\n### 2. Configuration ###\n\nCopy default configuration file to your app/config directory.\n\n```\n$ cp fuel/packages/fuel-jobqueue/config/jobqueue.php fuel/app/config\n```\n\nIf you want to run beanstalkd in other machine or port, edit configuration.\n\nFor the moment, keep default configuration.\n\n```php\nreturn array(\n    // default connection name\n    'default' =\u003e 'default_connection',\n    \n    'connections' =\u003e array(\n        'default_connection' =\u003e array(\n            'driver'   =\u003e 'beanstalkd',\n            'host'     =\u003e '127.0.0.1',\n            'port'     =\u003e '11300',\n            'queue'    =\u003e 'jobqueue',\n        ),\n    ),\n);\n```\n\n\n### 3. Install and run beanstalkd ###\n\nCurrently, fuel-jobqueue uses [beanstalkd](http://kr.github.io/beanstalkd/) as a backend of queueing.\n\nIf beanstalkd is not installed in your machine, install it first.\n\n```\n# Example: homebrew (Mac)\n$ brew install beanstalkd\n$ beanstalkd\n```\n\n```\n# Example: Ubuntu\n$ sudo apt-get install beanstalkd\n```\n\nIf you want to know about beanstalkd more, see [](https://github.com/kr/beanstalkd).\n\n\n### 4. Define Job ###\n\nDefine your job handler class in `fuel/app/classes/myjob.php`.\n\n```php\n\u003c?php\nclass Myjob\n{\n    // [IMPORTANT] Requires 'fire' method as a entry point.\n    public function fire($job, $data)\n    {\n        // heavy job\n        sleep(10);\n    }\n}\n```\n\n### 5. Queueing Job ###\n\nIn your controller, call `\\Jobqueue\\Queue::push($job, $data)` to push a new job.\n\n```php\nclass Controller_Welcome extends Controller\n{\n    public function action_index()\n    {\n        // push a new job onto the default queue of the default connection.\n        // 'Myjob' is a class name you have defined.\n        \\Jobqueue\\Queue::push('Myjob', array('message' =\u003e 'Hello World!'));\n        \n        return Response::forge(View::forge('welcome/index'));\n    }\n    ...\n```\n\n### 6. Run worker task ###\n\nQueued jobs cannot be executed untill the worker process pop it from the queue.\n\n```\n$ cd FUEL_ROOT\n$ php oil refine jqworker:listen --connection=default_connection --queue=jobqueue\n```\n\n### 7. Execute controller action ###\n\nNow, we are ready for queueing!\n\nExecute your controller action.\n\n\n## Configuration ##\n\nSorry under construction...\n\n\n## Job ##\n\nSorry under construction...\n\n\n## Queue ##\n\nSorry under construction...\n\n\n## Task ##\n\nSorry under construction...\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhosopy%2Ffuel-jobqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhosopy%2Ffuel-jobqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhosopy%2Ffuel-jobqueue/lists"}