You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create & dispatch a Job using MongoDB as queue driver
Call $this->release() in the job
Exception: job->release() leads to "Call to a member function beginTransaction() on null" error
Expected behaviour
Job should be pushed back onto the queue with count of attempts += 1
Actual behaviour
Exception: Call to a member function beginTransaction() on null
Cause
In Laravel 8 the Illuminate\Queue\DatabaseQueue class was updated with changed functionality. Instead of calling $database->release() it nows calls a new method $database->deleteAndRelease() which wraps the delete & release operations into a transaction, I'll try to add a PR later which fixes this in Jenssegers\Mongodb\Queue\MongoQueue by adding an overwrite (like it is already done for deleteReserved() and pop() methods of the DatabaseQueue):
public function deleteAndRelease($queue, $job, $delay)
{
$this->deleteReserved($queue, $job->getJobId());
$this->release($queue, $job->getJobRecord(), $delay);
}
Logs:
Insert log.txt here (if necessary)
The text was updated successfully, but these errors were encountered:
Description:
Steps to reproduce
Expected behaviour
Job should be pushed back onto the queue with count of attempts += 1
Actual behaviour
Exception: Call to a member function beginTransaction() on null
Cause
In Laravel 8 the Illuminate\Queue\DatabaseQueue class was updated with changed functionality. Instead of calling $database->release() it nows calls a new method $database->deleteAndRelease() which wraps the delete & release operations into a transaction, I'll try to add a PR later which fixes this in Jenssegers\Mongodb\Queue\MongoQueue by adding an overwrite (like it is already done for deleteReserved() and pop() methods of the DatabaseQueue):
Logs:
Insert log.txt here (if necessary)The text was updated successfully, but these errors were encountered: