Job retries
This commit is contained in:
@ -12,14 +12,18 @@ class Redis
|
||||
/**
|
||||
* @param string $name
|
||||
* @return string|null
|
||||
* @throws Exception|ConnectionException
|
||||
* @throws Exception
|
||||
*/
|
||||
public function get(string $name): ?string
|
||||
{
|
||||
if (!$this->client->exists($name)) {
|
||||
throw new Exception($name);
|
||||
}
|
||||
return $this->client->get($name);
|
||||
try {
|
||||
return $this->client->get($name);
|
||||
} catch (ConnectionException $exception) {
|
||||
throw new Exception($exception->getMessage(), $exception->getCode(), $exception);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -27,7 +31,6 @@ class Redis
|
||||
* @param mixed $value
|
||||
* @param int $expirationTTL
|
||||
* @return void
|
||||
* @throws ConnectionException
|
||||
*/
|
||||
public function set(string $name, mixed $value, int $expirationTTL = 60 * 60 * 24): void
|
||||
{
|
||||
|
Reference in New Issue
Block a user