protected function processWorker($worker_name, $new_job) { fwrite(STDOUT, sprintf("Running worker (%s) now... ", $worker_name)); $newWorker = \PHPQueue\Base::getWorker($worker_name); \PHPQueue\Base::workJob($newWorker, $new_job); fwrite(STDOUT, "Done.\n"); return $newWorker->result_data; }
protected function processWorker($worker_name, $new_job) { $newWorker = \PHPQueue\Base::getWorker($worker_name); \PHPQueue\Base::workJob($newWorker, $new_job); return $newWorker->result_data; }
protected function processWorker($worker_name, $new_job) { $this->logger->addInfo(sprintf("Running new job (%s) with worker: %s", $new_job->job_id, $worker_name)); $worker = \PHPQueue\Base::getWorker($worker_name); \PHPQueue\Base::workJob($worker, $new_job); $this->logger->addInfo(sprintf('Worker is done. Updating job (%s). Result:', $new_job->job_id), $worker->result_data); return $worker->result_data; }