Closed c-zenker closed 12 months ago
Hey there,
Can you first please try one of the support channels below? If you can actually identify this as a bug, feel free to open up a new issue with a link to the original one and we'll gladly help you out.
Thanks!
Laravel Version
10.24.0
PHP Version
8.2.10
Database Driver & Version
MySQL 8 in docker environment
Description
Hi, we are facing a problem with ShouldBeUnique or ShouldBeUniqueUntilProcessing Jobs that get dispatched to a database queue connection. When the database is not (yet) available, or our containers are facing temporary issues when connecting to the database, the job dispatch fails (as expected). But unexpectedly the locking-mechanism (using e.g. file cache driver) still locks and this job cannot be dispatched anymore, even when the database connection is up again.
Steps To Reproduce
Example Job:
Example dispatch (via artisan command):
Reproduce
1) Don't start the database (yet) or shut it down 2)
php artisan tmp:sth
The command fails with a database connection timeout exception, as expected3) Start database 4)
php artisan tmp:sth
Actual behaviour: The command succeeds, but does not try to dispatch the TestJob to the database job queue anymore. The job-queue remains empty. Expected behaviour: The command succeeds and the TestJob got dispatched to the database