mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
fix(core): Initialize queue once in queue mode (#8025)
We're initializing the queue twice because of a [bad
merge](2c63474538
).
No associated known bugs but no need to init the queue twice. We should
follow up by investigating if any pending bugs can be associated to
this.
This commit is contained in:
parent
329e5bf9ee
commit
53c0b49d15
|
@ -292,7 +292,6 @@ export class Worker extends BaseCommand {
|
||||||
this.logger.debug('Queue init complete');
|
this.logger.debug('Queue init complete');
|
||||||
await this.initOrchestration();
|
await this.initOrchestration();
|
||||||
this.logger.debug('Orchestration init complete');
|
this.logger.debug('Orchestration init complete');
|
||||||
await this.initQueue();
|
|
||||||
|
|
||||||
await Container.get(OrchestrationWorkerService).publishToEventLog(
|
await Container.get(OrchestrationWorkerService).publishToEventLog(
|
||||||
new EventMessageGeneric({
|
new EventMessageGeneric({
|
||||||
|
|
|
@ -65,15 +65,15 @@ test('worker initializes all its components', async () => {
|
||||||
expect(worker.queueModeId).toBeDefined();
|
expect(worker.queueModeId).toBeDefined();
|
||||||
expect(worker.queueModeId).toContain('worker');
|
expect(worker.queueModeId).toContain('worker');
|
||||||
expect(worker.queueModeId.length).toBeGreaterThan(15);
|
expect(worker.queueModeId.length).toBeGreaterThan(15);
|
||||||
expect(worker.initLicense).toHaveBeenCalled();
|
expect(worker.initLicense).toHaveBeenCalledTimes(1);
|
||||||
expect(worker.initBinaryDataService).toHaveBeenCalled();
|
expect(worker.initBinaryDataService).toHaveBeenCalledTimes(1);
|
||||||
expect(worker.initExternalHooks).toHaveBeenCalled();
|
expect(worker.initExternalHooks).toHaveBeenCalledTimes(1);
|
||||||
expect(worker.initExternalSecrets).toHaveBeenCalled();
|
expect(worker.initExternalSecrets).toHaveBeenCalledTimes(1);
|
||||||
expect(worker.initEventBus).toHaveBeenCalled();
|
expect(worker.initEventBus).toHaveBeenCalledTimes(1);
|
||||||
expect(worker.initOrchestration).toHaveBeenCalled();
|
expect(worker.initOrchestration).toHaveBeenCalledTimes(1);
|
||||||
expect(OrchestrationHandlerWorkerService.prototype.initSubscriber).toHaveBeenCalled();
|
expect(OrchestrationHandlerWorkerService.prototype.initSubscriber).toHaveBeenCalledTimes(1);
|
||||||
expect(OrchestrationWorkerService.prototype.publishToEventLog).toHaveBeenCalled();
|
expect(OrchestrationWorkerService.prototype.publishToEventLog).toHaveBeenCalledTimes(1);
|
||||||
expect(worker.initQueue).toHaveBeenCalled();
|
expect(worker.initQueue).toHaveBeenCalledTimes(1);
|
||||||
|
|
||||||
jest.restoreAllMocks();
|
jest.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue