A CodeIgniter library for a simple queue system using gearman. Please feel free to let me know (or just fork) if you find any bugs or improvements points.
Thanks, Donny (https://github.com/black-lotus)
- PHP 5.0 or more
- CodeIgniter 2.0 or more (http://codeigniter.com)
- Gearman PHP Extension https://pecl.php.net/package/gearman)
The Gearman extension is required for Gearman Codeigniter Library to work, so please install the Gearman extension library first (if you have not done so yet).
Add function :
$this->gearman_worker->add_function('function_name', 'function');
Or, you can access gearman instance :
$this->gearman_worker->instance->{native_method};
Do normal :
$res = $this->gearman_client->do_normal('function_name', 'params');
var_dump($res);
Do background :
$this->gearman_client->do_background('function_name', 'params');
Or, you can access gearman instance :
$this->gearman_client->instance->{native_method};
This library is released under the GPL license.