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:
parent
207ca28a46
commit
1af20bd955
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user