From af8486129523ca9c4ceaca527541d301ff429543 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Wed, 6 Nov 2024 02:03:51 +0400 Subject: [PATCH] [2.x] Reset scoped instances before running a new vapor job (#183) * reset scoped instances before running a new vapor job * wip --- src/Queue/VaporWorker.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Queue/VaporWorker.php b/src/Queue/VaporWorker.php index 8d80a9f..2adc149 100644 --- a/src/Queue/VaporWorker.php +++ b/src/Queue/VaporWorker.php @@ -18,6 +18,8 @@ class VaporWorker extends Worker */ public function runVaporJob($job, $connectionName, WorkerOptions $options) { + app()->forgetScopedInstances(); + pcntl_async_signals(true); pcntl_signal(SIGALRM, function () use ($job) {