/** * Tell Redis which job we're currently working on. * * @param Job $job Job instance containing the job we're working on. */ public function workingOn(Job &$job) { $this->job = $job; $job->setWorker($this); Event::fire(Event::WORKER_WORKING_ON, array($this, $job)); $this->redis->hmset(self::redisKey($this), array('job_id' => $job->getId(), 'job_started' => microtime(true))); }