-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
refactor(omnichannel): spare few Room.find on requestRoom method #32363
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 |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #32363 +/- ##
===========================================
- Coverage 56.66% 56.65% -0.01%
===========================================
Files 2504 2501 -3
Lines 55524 55484 -40
Branches 11442 11433 -9
===========================================
- Hits 31462 31434 -28
+ Misses 21376 21369 -7
+ Partials 2686 2681 -5
Flags with carried forward coverage won't be shown. Click here to find out more. |
c3e7598
to
eac2d8b
Compare
a62c7eb
to
4050861
Compare
4050861
to
705cbca
Compare
2c6f7aa
to
2dce3f5
Compare
…/removeUsers * 'develop' of github.com:RocketChat/Rocket.Chat: refactor(omnichannel): replace create and find by findAndUpdate (#32773) chore: Bump apps engine 1.44-alpha (#32774) refactor(client): Remove usage of `React.FC` type (#32760) refactor(Livechat): `Livechat/Message/markdown.js` -> TS (#32295) refactor(omnichannel): spare few Room.find on requestRoom method (#32363) refactor: `dispatchInquiryPosition` being called multiple times (#32767) fix: SAML "Overwrite user fullname" setting is not being honored (#32628) fix(Omnichannel): Use Correct components on ChatInfo (#32592)
OPI-22
Proposed changes (including videos or screenshots)
Changing the order in which things happen can help avoid testing the same things multiple times.
Previously, we would test if the system had an agent online, then find who was online, and then assign once again. These actions end up being repetitive, making the system difficult to understand and consuming CPU.
We also avoid calling the same collection multiple times to update different fields on the same document, thus optimizing messages sent to the database.
Database operations( find/update)
GET http://localhost:3000/api/v1/livechat/room?token=${visitor.token}
88 versus 76
With that, the order of events has changed a bit, but I believe it's not something problematic.
old:
new
Issue(s)
after:
Steps to test or reproduce
Further comments
https://rocketchat.atlassian.net/browse/CORE-440