mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Reset cache on setup
This commit is contained in:
+7
-6
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user