Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Service/GearmanExecute.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,15 +357,17 @@ private function addServers(\GearmanWorker $gmworker, array $servers)
* Executes a worker given a workerName subscribing all his jobs inside and
* given settings and annotations of worker and jobs
*
* @param string $workerName Name of worker to be executed
* @param string $workerName Name of worker to be executed
* @param array $options Array of options passed to the callback
* @param \GearmanWorker $gearmanWorker
*/
public function executeWorker($workerName, array $options = array())
public function executeWorker($workerName, array $options = array(), \GearmanWorker $gearmanWorker = null)
{
$worker = $this->getWorker($workerName);

if (false !== $worker) {

$this->callJob($worker, $options);
$this->callJob($worker, $options, $gearmanWorker);
}
}

Expand Down