Example #1
0
 /**
  * @param bool|null $data
  *
  * @throws QlessException If the heartbeat fails
  * @return int timestamp of the heartbeat
  */
 public function heartbeat($data = null)
 {
     // (now, jid, worker, data)
     if (is_array($data)) {
         $data = json_encode($data, JSON_UNESCAPED_SLASHES);
     }
     return $this->expires = $this->client->heartbeat($this->jid, $this->worker_name, $data);
 }