diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index db8a85266ad5..8f728290289a 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -69,6 +69,7 @@ class CheckData extends Command $this->checkBalances(); if (! $this->option('client_id')) { + $this->checkFailedJobs(); $this->checkAccountData(); } @@ -91,6 +92,17 @@ class CheckData extends Command $this->log .= $str . "\n"; } + private function checkFailedJobs() + { + $count = DB::table('failed_jobs')->count(); + + if ($count > 0) { + $this->isValid = false; + } + + $this->logMessage($count . ' failed jobs'); + } + private function checkBlankInvoiceHistory() { $count = DB::table('activities')