mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 19:04:33 -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()
|
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()) {
|
if ($check['system_health'] == true && $check['simple_db_check'] && Schema::hasTable('accounts') && $account = Account::first()) {
|
||||||
return redirect('/');
|
return redirect('/');
|
||||||
@ -59,7 +59,7 @@ class SetupController extends Controller
|
|||||||
public function doSetup(StoreSetupRequest $request)
|
public function doSetup(StoreSetupRequest $request)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$check = SystemHealth::check(false);
|
$check = SystemHealth::check(false, false);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
nlog(['message' => $e->getMessage(), 'action' => 'SetupController::doSetup()']);
|
nlog(['message' => $e->getMessage(), 'action' => 'SetupController::doSetup()']);
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class SystemHealth
|
|||||||
* @param bool $check_database
|
* @param bool $check_database
|
||||||
* @return array Result set of checks
|
* @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;
|
$system_health = true;
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class SystemHealth
|
|||||||
'pdf_engine' => (string) self::getPdfEngine(),
|
'pdf_engine' => (string) self::getPdfEngine(),
|
||||||
'queue' => (string) config('queue.default'),
|
'queue' => (string) config('queue.default'),
|
||||||
'trailing_slash' => (bool) self::checkUrlState(),
|
'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(),
|
'exchange_rate_api_not_configured' => (bool)self::checkCurrencySanity(),
|
||||||
'api_version' => (string) config('ninja.app_version'),
|
'api_version' => (string) config('ninja.app_version'),
|
||||||
'is_docker' => (bool) config('ninja.is_docker'),
|
'is_docker' => (bool) config('ninja.is_docker'),
|
||||||
|
@ -25,7 +25,7 @@ trait AppSetup
|
|||||||
return Ninja::isNinja();
|
return Ninja::isNinja();
|
||||||
}
|
}
|
||||||
|
|
||||||
$check = SystemHealth::check();
|
$check = SystemHealth::check(true, false);
|
||||||
|
|
||||||
return $check['system_health'] == 'true';
|
return $check['system_health'] == 'true';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user