Skip to content

Commit

Permalink
fix: Omnichannel queue starting multiple times due to race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandernsilva committed Nov 26, 2024
1 parent e49c987 commit 4f035bc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions apps/meteor/server/services/omnichannel/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@ export class OmnichannelService extends ServiceClassInternal implements IOmnicha
}

async started() {
settings.watch<boolean>('Livechat_enabled', (enabled) => {
void (enabled && RoutingManager.isMethodSet() ? this.queueWorker.shouldStart() : this.queueWorker.stop());
});

settings.watch<string>('Livechat_Routing_Method', async () => {
settings.watchMultiple(['Livechat_enabled', 'Livechat_Routing_Method'], () => {
this.queueWorker.shouldStart();
});

Expand Down

0 comments on commit 4f035bc

Please sign in to comment.