A Kohana module for queuing asynchronous tasks though php-resque.
git submodule add [email protected]:dexamped/kohana-resque.git modules/kohana-resque
git submodule update --init --recursive
We have to load vendor's dependencies by running composer install
composer install --working-dir=modules/kohana-resque/vendor/php-resque
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.
From the shell: ./modules/kohana-resque/resque
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
Documentation coming