-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Omnichannel queue starting multiple times due to race condition #34062
base: develop
Are you sure you want to change the base?
Conversation
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 8f0c01c The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3dd2987
to
4f035bc
Compare
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #34062 +/- ##
===========================================
- Coverage 75.79% 75.79% -0.01%
===========================================
Files 510 511 +1
Lines 22063 22130 +67
Branches 5385 5394 +9
===========================================
+ Hits 16723 16773 +50
- Misses 4694 4709 +15
- Partials 646 648 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will still be called multiple times as shouldStart
is also called when the license is validated.
2e859f4
to
b009711
Compare
} | ||
|
||
async stop() { | ||
await this.serviceStarter.stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await this.serviceStarter.stop(); | |
return this.serviceStarter.stop(); |
@@ -34,20 +46,34 @@ export class OmnichannelQueue implements IOmnichannelQueue { | |||
this.running = true; | |||
|
|||
queueLogger.info('Service started'); | |||
return this.execute(); | |||
await this.execute(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
await this.execute(); | |
return this.execute(); |
Proposed changes (including videos or screenshots)
This PR fixes a bug causing the Omnichannel queue to start more than once due to a race condition. In order to prevent the race condition
settings.watch
was changed tosettings.watchMultiple
which has a debounce built in.Bug caught through this test omnichannel-livechat-queue-management-autoselection.spec.ts
Introduced here: #33719
Issue(s)
Steps to test or reproduce
Further comments
CONN-429