From ee4720fe2c5c2976cdfd0d03dda3129b8a672454 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Mon, 13 Feb 2023 02:37:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=20=E5=8F=AA=E8=AE=A1?= =?UTF-8?q?=E8=B4=B9=E5=8A=A8=E6=80=81=E8=AE=A1=E8=B4=B9=E5=AE=9E=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/Host/DispatchHostCostQueueJob.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Host/DispatchHostCostQueueJob.php b/app/Jobs/Host/DispatchHostCostQueueJob.php index 04bfc63..dbd837a 100644 --- a/app/Jobs/Host/DispatchHostCostQueueJob.php +++ b/app/Jobs/Host/DispatchHostCostQueueJob.php @@ -36,14 +36,14 @@ public function __construct($minute, Host $host = null) */ public function handle(): void { - if (! $this->host) { + if (!$this->host) { $host = new Host(); if (app()->environment() != 'local') { $host = $host->where('minute_at', $this->minute); } - $host->whereIn('status', ['running', 'stopped'])->with('user')->chunk(500, function ($hosts) { + $host->whereIn('status', ['running', 'stopped'])->whereNull('billing_cycle')->with('user')->chunk(500, function ($hosts) { foreach ($hosts as $host) { dispatch(new self($this->minute, $host)); }