feat: Workflow History pruning and prune time settings (#7343)

Github issue / Community forum post (link here to close automatically):
This commit is contained in:
Val
2023-10-04 13:57:21 +01:00
committed by GitHub
parent 6d3d1789db
commit 0adc533719
13 changed files with 401 additions and 2 deletions

View File

@@ -178,7 +178,11 @@ import { JwtService } from './services/jwt.service';
import { RoleService } from './services/role.service';
import { UserService } from './services/user.service';
import { OrchestrationController } from './controllers/orchestration.controller';
import { isWorkflowHistoryEnabled } from './workflows/workflowHistory/workflowHistoryHelper.ee';
import {
getWorkflowHistoryLicensePruneTime,
getWorkflowHistoryPruneTime,
isWorkflowHistoryEnabled,
} from './workflows/workflowHistory/workflowHistoryHelper.ee';
import { WorkflowHistoryController } from './workflows/workflowHistory/workflowHistory.controller.ee';
const exec = promisify(callbackExec);
@@ -350,6 +354,10 @@ export class Server extends AbstractServer {
ai: {
enabled: config.getEnv('ai.enabled'),
},
workflowHistory: {
pruneTime: -1,
licensePruneTime: -1,
},
};
}
@@ -496,6 +504,13 @@ export class Server extends AbstractServer {
this.frontendSettings.variables.limit = getVariablesLimit();
}
if (isWorkflowHistoryEnabled()) {
Object.assign(this.frontendSettings.workflowHistory, {
pruneTime: getWorkflowHistoryPruneTime(),
licensePruneTime: getWorkflowHistoryLicensePruneTime(),
});
}
if (config.get('nodes.packagesMissing').length > 0) {
this.frontendSettings.missingPackages = true;
}