diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index 7e4a1b979c..b6bb2d41c1 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -382,19 +382,14 @@ class CheckData extends Command return; } - $current = config('database.default'); $queueDB = config('queue.connections.database.connection'); - config(['database.default' => $queueDB]); - - $count = DB::table('failed_jobs')->count(); + $count = DB::connection($queueDB)->table('failed_jobs')->count(); if ($count > 0) { $this->isValid = false; } $this->logMessage($count . ' failed jobs'); - - config(['database.default' => $current]); } private function checkBlankInvoiceHistory()