MwGearman
MwGearman copied to clipboard
getting exception when trying to run worker
Following your example for worker:
$serviceMananger = $this->getServiceLocator();
$gearmanW = $serviceMananger->get('mwGearman\Worker\Pecl');
$gearmanW->register('myJob8', array('Listuploads\Model\SubscribeJob','execute'));
$gearmanW->connect();
while($gearmanW->work());
when I run worker this is what I get:
PHP Warning: Illegal offset type in isset or empty in /Library/WebServer/Documents/subcenter/vendor/mwillbanks/mw-gearman/src/mwGearman/Worker/Pecl.php on line 174 PHP Warning: Illegal offset type in /Library/WebServer/Documents/subcenter/vendor/mwillbanks/mw-gearman/src/mwGearman/Worker/Pecl.php on line 175 PHP Fatal error: Call to a member function addServers() on a non-object in /Library/WebServer/Documents/subcenter/vendor/mwillbanks/mw-gearman/src/mwGearman/Worker/Pecl.php on line 119
Just for clarification, using directly the pecl gearman functions works ok.
What am I doing wrong? Thank you for your time and for writing this :)