mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
Changed vacuum operation to run on startup only. Also it is now off by default.
This commit is contained in:
@@ -160,12 +160,10 @@ export class Start extends Command {
|
||||
const dbType = await GenericHelpers.getConfigValue('database.type') as DatabaseType;
|
||||
|
||||
if (dbType === 'sqlite') {
|
||||
const vacuumInterval = config.get('database.sqlite.vacuumInterval') as number;
|
||||
if (vacuumInterval >= 0) {
|
||||
const shouldRunVacuum = config.get('database.sqlite.executeVacuumOnStartup') as number;
|
||||
if (shouldRunVacuum) {
|
||||
console.log('ran vacuum');
|
||||
Db.collections.Execution!.query("VACUUM;");
|
||||
if (vacuumInterval > 0) {
|
||||
setInterval(() => Db.collections.Execution!.query("VACUUM;"), vacuumInterval * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user