diff --git a/apps/backend/src/services/outbreak.service.ts b/apps/backend/src/services/outbreak.service.ts index cda11d16..137b5eeb 100644 --- a/apps/backend/src/services/outbreak.service.ts +++ b/apps/backend/src/services/outbreak.service.ts @@ -13,7 +13,7 @@ export class OutbreakService { async delegate(reqs: Array, args: AppBrokers) { reqs.forEach(({ realm, contents }) => { contents.forEach(({ value }) => { - args.useBullMQ && this.bullmq?.add(realm, value).catch((error) => error); + if (args.useBullMQ) this.bullmq?.add(realm, value).catch((error) => error); }); }); } diff --git a/apps/ms-bridge/src/modules/mqtt-client.module.ts b/apps/ms-bridge/src/modules/mqtt-client.module.ts index 5c67dd4d..9af26a30 100644 --- a/apps/ms-bridge/src/modules/mqtt-client.module.ts +++ b/apps/ms-bridge/src/modules/mqtt-client.module.ts @@ -131,7 +131,7 @@ class MqttClient { */ public unsubscribe(topic: string, options?: IClientSubscribeOptions) { this.client.unsubscribe(topic, options, () => { - this.topics.delete(topic) && this.logger.log(`${topic} unsubscribed`); + if (this.topics.delete(topic)) this.logger.log(`${topic} unsubscribed`); }); return this; }