Check failed_jobs is empty in check-data

This commit is contained in:
Hillel Coren 2017-02-21 19:54:00 +02:00
parent 1487da3dc4
commit 392bfa7c25

View File

@ -69,6 +69,7 @@ class CheckData extends Command
$this->checkBalances(); $this->checkBalances();
if (! $this->option('client_id')) { if (! $this->option('client_id')) {
$this->checkFailedJobs();
$this->checkAccountData(); $this->checkAccountData();
} }
@ -91,6 +92,17 @@ class CheckData extends Command
$this->log .= $str . "\n"; $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() private function checkBlankInvoiceHistory()
{ {
$count = DB::table('activities') $count = DB::table('activities')