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();
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')