[Messenger] Lowercased method calls on \Redis

This commit is contained in:
Robin Chalas 2019-05-01 15:13:23 +02:00
parent 90326e67d5
commit 2d41976b26

View File

@ -79,7 +79,7 @@ class Connection
$e = null; $e = null;
try { try {
$messages = $this->connection->xReadGroup( $messages = $this->connection->xreadgroup(
$this->group, $this->group,
$this->consumer, $this->consumer,
[$this->stream => $messageId], [$this->stream => $messageId],
@ -119,7 +119,7 @@ class Connection
{ {
$e = null; $e = null;
try { try {
$acknowledged = $this->connection->xAck($this->stream, $this->group, [$id]); $acknowledged = $this->connection->xack($this->stream, $this->group, [$id]);
} catch (\RedisException $e) { } catch (\RedisException $e) {
} }
@ -132,7 +132,7 @@ class Connection
{ {
$e = null; $e = null;
try { try {
$deleted = $this->connection->xDel($this->stream, [$id]); $deleted = $this->connection->xdel($this->stream, [$id]);
} catch (\RedisException $e) { } catch (\RedisException $e) {
} }
@ -145,7 +145,7 @@ class Connection
{ {
$e = null; $e = null;
try { try {
$added = $this->connection->xAdd($this->stream, '*', ['message' => json_encode( $added = $this->connection->xadd($this->stream, '*', ['message' => json_encode(
['body' => $body, 'headers' => $headers] ['body' => $body, 'headers' => $headers]
)]); )]);
} catch (\RedisException $e) { } catch (\RedisException $e) {
@ -159,7 +159,7 @@ class Connection
public function setup(): void public function setup(): void
{ {
try { try {
$this->connection->xGroup('CREATE', $this->stream, $this->group, 0, true); $this->connection->xgroup('CREATE', $this->stream, $this->group, 0, true);
} catch (\RedisException $e) { } catch (\RedisException $e) {
throw new TransportException($e->getMessage(), 0, $e); throw new TransportException($e->getMessage(), 0, $e);
} }