Skip to content

Commit

Permalink
Merge pull request #47 from michalsn/fix-reconnect
Browse files Browse the repository at this point in the history
Add an additional condition before `reconnect()`
  • Loading branch information
michalsn authored Sep 19, 2024
2 parents 7cccd8e + e0a7043 commit 8377361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/QueueJobModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getFromQueue(string $name, array $priority): ?QueueJob
{
// For SQLite3 memory database this will cause problems
// so check if we're not in the testing environment first.
if ($this->db->database !== ':memory:') {
if ($this->db->database !== ':memory:' && $this->db->connID !== false) {
// Make sure we still have the connection
$this->db->reconnect();
}
Expand Down

0 comments on commit 8377361

Please sign in to comment.