Reset cache on setup
This commit is contained in:
parent
7192ead92d
commit
81bf74ef06
1 changed files with 7 additions and 6 deletions
13
app/http.php
13
app/http.php
|
@ -50,16 +50,21 @@ $http->on('AfterReload', function($serv, $workerId) {
|
||||||
Console::success('Reload completed...');
|
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');
|
$app = new App('UTC');
|
||||||
$dbForConsole = $app->getResource('dbForConsole'); /** @var Utopia\Database\Database $dbForConsole */
|
$dbForConsole = $app->getResource('dbForConsole'); /** @var Utopia\Database\Database $dbForConsole */
|
||||||
|
|
||||||
if(!$dbForConsole->exists()) {
|
if(!$dbForConsole->exists()) {
|
||||||
Console::success('[Setup] - Server database init started...');
|
Console::success('[Setup] - Server database init started...');
|
||||||
|
|
||||||
$collections = Config::getParam('collections2', []); /** @var array $collections */
|
$collections = Config::getParam('collections2', []); /** @var array $collections */
|
||||||
|
|
||||||
|
$register->get('cache')->flushAll();
|
||||||
|
|
||||||
$dbForConsole->create();
|
$dbForConsole->create();
|
||||||
|
|
||||||
foreach ($collections as $key => $collection) {
|
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', '');
|
$domain = App::getEnv('_APP_DOMAIN', '');
|
||||||
|
|
||||||
Console::info('Issuing a TLS certificate for the master domain ('.$domain.') in 30 seconds.
|
Console::info('Issuing a TLS certificate for the master domain ('.$domain.') in 30 seconds.
|
||||||
|
|
Loading…
Reference in a new issue