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
@@ -13,20 +13,11 @@ export class InternalHooksManager {
|
||||
throw new Error('InternalHooks not initialized');
|
||||
}
|
||||
|
||||
static async init(
|
||||
instanceId: string,
|
||||
versionCli: string,
|
||||
nodeTypes: INodeTypes,
|
||||
): Promise<InternalHooksClass> {
|
||||
static async init(instanceId: string, nodeTypes: INodeTypes): Promise<InternalHooksClass> {
|
||||
if (!this.internalHooksInstance) {
|
||||
const telemetry = new Telemetry(instanceId, versionCli);
|
||||
const telemetry = new Telemetry(instanceId);
|
||||
await telemetry.init();
|
||||
this.internalHooksInstance = new InternalHooksClass(
|
||||
telemetry,
|
||||
instanceId,
|
||||
versionCli,
|
||||
nodeTypes,
|
||||
);
|
||||
this.internalHooksInstance = new InternalHooksClass(telemetry, instanceId, nodeTypes);
|
||||
}
|
||||
|
||||
return this.internalHooksInstance;
|
||||
|
||||
Reference in New Issue
Block a user