fix(core): Restore queue listeners for webhook process (#10781)

This commit is contained in:
Iván Ovejero
2024-09-12 12:55:24 +02:00
committed by GitHub
parent b2b6190cc0
commit 86f4877bab
2 changed files with 26 additions and 10 deletions

View File

@@ -209,8 +209,8 @@ export class ScalingService {
throw error;
});
if (this.instanceType === 'main') {
this.registerMainListeners();
if (this.instanceType === 'main' || this.instanceType === 'webhook') {
this.registerMainOrWebhookListeners();
} else if (this.instanceType === 'worker') {
this.registerWorkerListeners();
}
@@ -246,9 +246,9 @@ export class ScalingService {
}
/**
* Register listeners on a `main` process for Bull queue events.
* Register listeners on a `main` or `webhook` process for Bull queue events.
*/
private registerMainListeners() {
private registerMainOrWebhookListeners() {
this.queue.on('global:progress', (_jobId: JobId, msg: unknown) => {
if (!this.isPubSubMessage(msg)) return;