n8n
Version:
n8n Workflow Automation Tool
34 lines • 1.48 kB
JavaScript
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWorkflowHistoryLicensed = isWorkflowHistoryLicensed;
exports.isWorkflowHistoryEnabled = isWorkflowHistoryEnabled;
exports.getWorkflowHistoryLicensePruneTime = getWorkflowHistoryLicensePruneTime;
exports.getWorkflowHistoryPruneTime = getWorkflowHistoryPruneTime;
const di_1 = require("@n8n/di");
const config_1 = __importDefault(require("../../config"));
const license_1 = require("../../license");
function isWorkflowHistoryLicensed() {
const license = di_1.Container.get(license_1.License);
return license.isWorkflowHistoryLicensed();
}
function isWorkflowHistoryEnabled() {
return isWorkflowHistoryLicensed() && config_1.default.getEnv('workflowHistory.enabled');
}
function getWorkflowHistoryLicensePruneTime() {
return di_1.Container.get(license_1.License).getWorkflowHistoryPruneLimit();
}
function getWorkflowHistoryPruneTime() {
const licenseTime = di_1.Container.get(license_1.License).getWorkflowHistoryPruneLimit();
const configTime = config_1.default.getEnv('workflowHistory.pruneTime');
if (licenseTime === -1) {
return configTime;
}
if (configTime === -1) {
return licenseTime;
}
return Math.min(configTime, licenseTime);
}
//# sourceMappingURL=workflow-history-helper.ee.js.map
;