1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Refactor check data

This commit is contained in:
Hillel Coren 2017-08-30 15:24:01 +03:00
parent 207ca28a46
commit 1af20bd955

View File

@ -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()