public function get() { do { $response = $this->redis->rpop("jobs"); usleep(500); } while ($response === null); return unserialize($response); }
/** * */ private function handleBufferedEvents() { $length = $this->redis->llen(self::BUFFER_LIST_KEY); $webHookData = []; for ($i = 0; $i < $length; $i++) { $event = $this->redis->rpop(self::BUFFER_LIST_KEY); $webHookData[] = json_decode($event, true); } $this->webHookApi->execute(WebHookEnum::HOST_MESSENGER_ONLINE_STATE_CHANGED, $webHookData); }
/** * {@inheritdoc} */ public function isAuthenticated() { $message = $this->redis->rpop($this->getKey('client.commands.' . $this->clientId . '.authenticate')); if (null == $message) { return null; } return unserialize($message); }
private function listPull() { return $this->client->rpop($this->key_header); }
public function rpop($channel) { return $this->client->rpop($channel); }