diff --git a/src/Clients/PhpRedisQueue.php b/src/Clients/PhpRedisQueue.php index 4764682..d47e206 100644 --- a/src/Clients/PhpRedisQueue.php +++ b/src/Clients/PhpRedisQueue.php @@ -1,6 +1,6 @@ client = $redis; } else { $this->client = new Redis(); $this->client->connect($config->host, $config->port); - $this->client->auth($config->password); + if ($config->password) { + $this->client->auth($config->password); + } + $this->client->select($config->db); } } diff --git a/src/DTOs/JobOpts.php b/src/DTOs/JobOpts.php index 5da5d88..5ab442e 100644 --- a/src/DTOs/JobOpts.php +++ b/src/DTOs/JobOpts.php @@ -12,4 +12,6 @@ class JobOpts extends DataTransferObject public int $attempts = 1; public int $timestamp; public int $delay = 0; + public bool $removeOnComplete = false; + public bool $removeOnFail = false; }