mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Move backend config to a separate package (no-changelog) (#9325)
This commit is contained in:
committed by
GitHub
parent
1d5b9836ca
commit
c7d4b471c4
@@ -8,6 +8,7 @@ import { createReadStream, createWriteStream, existsSync } from 'fs';
|
||||
import { pipeline } from 'stream/promises';
|
||||
import replaceStream from 'replacestream';
|
||||
import glob from 'fast-glob';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { jsonParse, randomString } from 'n8n-workflow';
|
||||
|
||||
import config from '@/config';
|
||||
@@ -260,9 +261,10 @@ export class Start extends BaseCommand {
|
||||
});
|
||||
}
|
||||
|
||||
const dbType = config.getEnv('database.type');
|
||||
const globalConfig = Container.get(GlobalConfig);
|
||||
const { type: dbType } = globalConfig.database;
|
||||
if (dbType === 'sqlite') {
|
||||
const shouldRunVacuum = config.getEnv('database.sqlite.executeVacuumOnStartup');
|
||||
const shouldRunVacuum = globalConfig.database.sqlite.executeVacuumOnStartup;
|
||||
if (shouldRunVacuum) {
|
||||
await Container.get(ExecutionRepository).query('VACUUM;');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user