mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Improve selfhost app load time
This commit is contained in:
parent
8e75e0d2ca
commit
54625ccc41
@ -43,7 +43,7 @@ class SetupController extends Controller
|
||||
|
||||
public function index()
|
||||
{
|
||||
$check = SystemHealth::check(false);
|
||||
$check = SystemHealth::check(false, false);
|
||||
|
||||
if ($check['system_health'] == true && $check['simple_db_check'] && Schema::hasTable('accounts') && $account = Account::first()) {
|
||||
return redirect('/');
|
||||
@ -59,7 +59,7 @@ class SetupController extends Controller
|
||||
public function doSetup(StoreSetupRequest $request)
|
||||
{
|
||||
try {
|
||||
$check = SystemHealth::check(false);
|
||||
$check = SystemHealth::check(false, false);
|
||||
} catch (Exception $e) {
|
||||
nlog(['message' => $e->getMessage(), 'action' => 'SetupController::doSetup()']);
|
||||
|
||||
|
@ -43,7 +43,7 @@ class SystemHealth
|
||||
* @param bool $check_database
|
||||
* @return array Result set of checks
|
||||
*/
|
||||
public static function check($check_database = true): array
|
||||
public static function check($check_database = true, $check_filesystem = true): array
|
||||
{
|
||||
$system_health = true;
|
||||
|
||||
@ -82,7 +82,7 @@ class SystemHealth
|
||||
'pdf_engine' => (string) self::getPdfEngine(),
|
||||
'queue' => (string) config('queue.default'),
|
||||
'trailing_slash' => (bool) self::checkUrlState(),
|
||||
'file_permissions' => (string) self::checkFileSystem(),
|
||||
'file_permissions' => (string) ($check_filesystem ? self::checkFileSystem() : ''),
|
||||
'exchange_rate_api_not_configured' => (bool)self::checkCurrencySanity(),
|
||||
'api_version' => (string) config('ninja.app_version'),
|
||||
'is_docker' => (bool) config('ninja.is_docker'),
|
||||
|
@ -25,7 +25,7 @@ trait AppSetup
|
||||
return Ninja::isNinja();
|
||||
}
|
||||
|
||||
$check = SystemHealth::check();
|
||||
$check = SystemHealth::check(true, false);
|
||||
|
||||
return $check['system_health'] == 'true';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user