dexamped / kohana-resque
Kohana wrapper for php-resque with minion support.
Installs: 4 832
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 3
Open Issues: 0
Requires
- php: >=5.3.3
- chrisboulton/php-resque: dev-master
- composer/installers: ~1.0
- kohana/core: >=3.3
This package is not auto-updated.
Last update: 2025-03-01 19:00:29 UTC
README
A Kohana module for queuing asynchronous tasks though php-resque.
Installation
Install the module
git submodule add git@github.com:dexamped/kohana-resque.git modules/kohana-resque
git submodule update --init --recursive
Load dependencies
We have to load vendor's dependencies by running composer install
composer install --working-dir=modules/kohana-resque/vendor/php-resque
Configuration
Edit application/bootstrap.php
and add the module:
Kohana::modules(array(
...
'resque' => 'modules/kohana-resque',
...
));
Copy the modules/kohana-resque/config/resque.php
to APPPATH/config/resque.php
and setup your config.
Running workers
From the shell: ./modules/kohana-resque/resque
Writing Tasks
Create a new Task: application/classes/Task/Mytask.php
class Task_Test extends Task_Resque { protected $_queue = 'myqueuename'; public function perform() { echo "Executing a task!\n"; } } // End Task_Test
Use with Minion
Documentation coming