Skip to content

Commit 0193edd

Browse files
authored
Exit after a queue timeout (#47)
1 parent 48b3c5a commit 0193edd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Queue/Worker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function runSqsJob(Job $job, string $connectionName, WorkerOptions $optio
2727
$job,
2828
$this->maxAttemptsExceededException($job),
2929
);
30+
31+
// exit so that PHP will shutdown and close DB connections etc.
32+
exit(1);
3033
});
3134

3235
pcntl_alarm(

0 commit comments

Comments
 (0)