-
Notifications
You must be signed in to change notification settings - Fork 294
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
feat(transcription): Slow down leaving participants. #528
Conversation
Slow down events internally in the transcriber, so we give time for the service to return any pending transcriptions. We also wait for all leave processing to finish before transcriber leaves the room, so any sent transcriptions to be processed.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #528 +/- ##
============================================
- Coverage 20.86% 20.49% -0.37%
+ Complexity 289 287 -2
============================================
Files 74 76 +2
Lines 6222 6313 +91
Branches 833 838 +5
============================================
- Hits 1298 1294 -4
- Misses 4699 4801 +102
+ Partials 225 218 -7
... and 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
/** | ||
* The thread pool to serve all leave operations. | ||
*/ | ||
private static final ScheduledExecutorService leaveThreadPool = Executors.newScheduledThreadPool( |
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.
Why 2 threads?
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.
The operation shouldn't be time-consuming and this is for the whole jigasi all meetings, not a strong reason.
// give some time for the transcriptions for this participant to be ready | ||
leaveThreadPool.schedule(() -> | ||
{ | ||
this.transcriber.participantLeft(identifier); |
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.
What if this throws? Maybe just decrement the counter beforehand?
Slow down events internally in the transcriber, so we give time for the service to return any pending transcriptions. We also wait for all leave processing to finish before transcriber leaves the room, so any sent transcriptions to be processed.