refactor(core): Load and validate all config at startup (no-changelog) (#5283)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-30 14:42:30 +01:00
committed by GitHub
parent b2f59c3f39
commit 72249e0de8
16 changed files with 80 additions and 163 deletions

View File

@@ -28,7 +28,6 @@ import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
import { NodeTypes } from '@/NodeTypes';
import { InternalHooksManager } from '@/InternalHooksManager';
import * as Server from '@/Server';
import type { DatabaseType } from '@/Interfaces';
import * as TestWebhooks from '@/TestWebhooks';
import { WaitTracker } from '@/WaitTracker';
@@ -279,7 +278,7 @@ export class Start extends Command {
const credentialTypes = CredentialTypes(loadNodesAndCredentials);
// Load the credentials overwrites if any exist
await CredentialsOverwrites(credentialTypes).init();
CredentialsOverwrites(credentialTypes);
await loadNodesAndCredentials.generateTypesForFrontend();
@@ -341,8 +340,7 @@ export class Start extends Command {
);
}
const dbType = (await GenericHelpers.getConfigValue('database.type')) as DatabaseType;
const dbType = config.getEnv('database.type');
if (dbType === 'sqlite') {
const shouldRunVacuum = config.getEnv('database.sqlite.executeVacuumOnStartup');
if (shouldRunVacuum) {