mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Delete a lot of unused and duplicate code in Server and WebhookServer (#5080)
* store n8n version string in a const and use that everywhere * reduce code duplication between Server and WebhookServer * unify redis checks * fix linting
This commit is contained in:
committed by
GitHub
parent
b67f803cbe
commit
8b19fdd5f0
@@ -76,6 +76,10 @@ export class ActiveWorkflowRunner {
|
||||
[key: string]: IQueuedWorkflowActivations;
|
||||
} = {};
|
||||
|
||||
constructor() {
|
||||
this.activeWorkflows = new ActiveWorkflows();
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
async init() {
|
||||
// Get the active workflows from database
|
||||
@@ -100,8 +104,6 @@ export class ActiveWorkflowRunner {
|
||||
await Db.collections.Webhook.clear();
|
||||
}
|
||||
|
||||
this.activeWorkflows = new ActiveWorkflows();
|
||||
|
||||
if (workflowsData.length !== 0) {
|
||||
console.info(' ================================');
|
||||
console.info(' Start Active Workflows:');
|
||||
@@ -147,11 +149,6 @@ export class ActiveWorkflowRunner {
|
||||
await externalHooks.run('activeWorkflows.initialized', []);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
async initWebhooks() {
|
||||
this.activeWorkflows = new ActiveWorkflows();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all the currently active workflows
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user