1
0
Fork 0
mirror of synced 2024-06-18 18:54:55 +12:00

Reset cache on setup

This commit is contained in:
Eldad Fux 2021-05-07 00:35:05 +03:00
parent 7192ead92d
commit 81bf74ef06

View file

@ -50,16 +50,21 @@ $http->on('AfterReload', function($serv, $workerId) {
Console::success('Reload completed...');
});
$http->on('start', function (Server $http) use ($payloadSize) {
Files::load(__DIR__ . '/../public');
include __DIR__ . '/controllers/general.php';
$http->on('start', function (Server $http) use ($payloadSize, $register) {
$app = new App('UTC');
$dbForConsole = $app->getResource('dbForConsole'); /** @var Utopia\Database\Database $dbForConsole */
if(!$dbForConsole->exists()) {
Console::success('[Setup] - Server database init started...');
$collections = Config::getParam('collections2', []); /** @var array $collections */
$register->get('cache')->flushAll();
$dbForConsole->create();
foreach ($collections as $key => $collection) {
@ -104,10 +109,6 @@ $http->on('start', function (Server $http) use ($payloadSize) {
});
});
Files::load(__DIR__ . '/../public');
include __DIR__ . '/controllers/general.php';
$domain = App::getEnv('_APP_DOMAIN', '');
Console::info('Issuing a TLS certificate for the master domain ('.$domain.') in 30 seconds.