public function testGetStatByName() { Stat::incr('test_get', 100); $this->assertEquals(100, Stat::get('test_get')); }
/** * Notify Redis that we've finished working on a job, clearing the working * state and incrementing the job stats. */ public function doneWorking() { $this->currentJob = null; Stat::incr('processed'); Stat::incr('processed:' . (string) $this); Resque::redis()->del('worker:' . (string) $this); }
/** * Mark the current job as having failed. * * @param $exception */ public function fail($exception) { Event::trigger('onFailure', array('exception' => $exception, 'job' => $this)); $this->updateStatus(Status::STATUS_FAILED); Failure::create($this->payload, $exception, $this->worker, $this->queue); Stat::incr('failed'); Stat::incr('failed:' . $this->worker); }