Пример #1
0
 /**
  * Delete a statistic with the given name.
  *
  * @param string $stat The name of the statistic to delete.
  * @return boolean True if successful, false if not.
  */
 public static function clear($stat)
 {
     return (bool) Resque::redis()->del('stat:' . $stat);
 }
Пример #2
0
 /**
  * Return an object describing the job this worker is currently working on.
  *
  * @return object Object with details of current job.
  */
 public function job()
 {
     $job = Resque::redis()->get('worker:' . $this);
     if (!$job) {
         return array();
     } else {
         return json_decode($job, true);
     }
 }
Пример #3
0
 /**
  * Stop tracking the status of a job.
  */
 public function stop()
 {
     Resque::redis()->del((string) $this);
 }