mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 05:34:30 -04:00
Refactor check data
This commit is contained in:
parent
207ca28a46
commit
1af20bd955
@ -382,19 +382,14 @@ class CheckData extends Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$current = config('database.default');
|
|
||||||
$queueDB = config('queue.connections.database.connection');
|
$queueDB = config('queue.connections.database.connection');
|
||||||
config(['database.default' => $queueDB]);
|
$count = DB::connection($queueDB)->table('failed_jobs')->count();
|
||||||
|
|
||||||
$count = DB::table('failed_jobs')->count();
|
|
||||||
|
|
||||||
if ($count > 0) {
|
if ($count > 0) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logMessage($count . ' failed jobs');
|
$this->logMessage($count . ' failed jobs');
|
||||||
|
|
||||||
config(['database.default' => $current]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkBlankInvoiceHistory()
|
private function checkBlankInvoiceHistory()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user