Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.

Commit a331bd2

Browse files
frdteknikelektrobarryvdh
authored andcommitted
Job should be marked as resolved and attemps should be incremented (#79)
1 parent 638574b commit a331bd2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/AsyncQueue.php

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Illuminate\Queue\DatabaseQueue;
66
use Illuminate\Queue\Jobs\DatabaseJob;
77
use Symfony\Component\Process\Process;
8+
use Illuminate\Queue\Jobs\DatabaseJobRecord;
89

910
class AsyncQueue extends DatabaseQueue
1011
{
@@ -114,6 +115,7 @@ public function getJobFromId($id)
114115
->first();
115116

116117
if ($job) {
118+
$job = $this->markJobAsReserved(new DatabaseJobRecord((object) $job));
117119
return new DatabaseJob(
118120
$this->container, $this, $job, $this->connectionName, $job->queue
119121
);

0 commit comments

Comments
 (0)