-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: Apply chat limits on enterprise Routing Algorithms #35831
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
Conversation
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: c3e33e6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 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 |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
apps/meteor/ee/app/livechat-enterprise/server/lib/routing/LoadBalancing.ts
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #35831 +/- ##
========================================
Coverage 61.16% 61.17%
========================================
Files 2971 2971
Lines 70838 70838
Branches 16184 16184
========================================
+ Hits 43330 43337 +7
+ Misses 24559 24552 -7
Partials 2949 2949
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
5b8ad6a
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Proposed changes (including videos or screenshots)
Issue(s)
https://rocketchat.atlassian.net/browse/CTZ-42
Steps to test or reproduce
Further comments
We improved the way we check the chat limits an agent is bound to. As the process is (should be, at least) faster and more intelligent, we need to improve it on all the routing mechanisms we have.
Currently, Auto Selection was the only one with the "optimized" process to ignore unavailable users. Now, this extends that to the other 2.
Should prevent issues caused by the algorithm selecting an agent that is out of limits, just for the server to realize this and cancel the assignment.
This is not a problem for autoselection or load rotation, where the "last assignment" is set at the moment the user is selected, but on load balancing, this depends on the user being actually assigned to the chat so others (with less load) can be picked, and since the user was not being assigned, then the algo returned the same user (less load) over and over until the situation changed and other agent was selected. :dum:
This pull request introduces a feature to apply chat limits on enterprise routing algorithms within the Rocket.Chat live chat system. The changes include refactoring the logic for applying simultaneous chat restrictions by extracting it into a separate function,
getChatLimitsQuery, and updating the callback to utilize this function. Additionally, thegetNextAgentmethod in both theLoadBalancing.tsandLoadRotation.tsfiles has been modified to incorporate new logic for handling unavailable users based on these chat limits. This enhancement aims to improve the efficiency of agent routing by considering chat limits when determining agent availability.This pull request introduces a feature to apply chat limits on enterprise routing algorithms within the Rocket.Chat platform. The changes include:
LoadBalancing.tsfile, where thegetNextAgentmethod now includes additional logic to handle unavailable users based on chat limits.LoadRotation.tsfile, introducing a new import forgetChatLimitsQueryand utilizing it in thegetNextAgentmethod to filter out unavailable users according to chat limits.These changes aim to improve the efficiency and reliability of the chat routing process in enterprise environments by enforcing chat limits.