-
-
Notifications
You must be signed in to change notification settings - Fork 114
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: fixes channel occupancy value not populate properly #968
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #968 +/- ##
=======================================
Coverage 86.69% 86.69%
=======================================
Files 177 177
Lines 3863 3863
Branches 949 949
=======================================
Hits 3349 3349
Misses 514 514 ☔ View full report in Codecov by Sentry. |
let channelOccupancy = 0; | ||
const now = Date.now(); | ||
|
||
// Decrement the number of clients in the room |
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.
// Decrement the number of clients in the room | |
// Grab channel occupancy if available |
const channelOccupancy = | ||
(await pubClient.hget('channels', channelId)) ?? undefined; | ||
|
||
const sRedisChannelOccupancy = await pubClient.hget('channels', channelId); |
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.
So this can be either a JSON string or a number (old format)? This function assumes this will always be a number. Does this code path need to handle both cases like the other places?
Quality Gate passedIssues Measures |
Explanation
Fixes channel occupancy value not populate properly on Redis
References
Checklist