-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add callback heartbeats for in-flight transcodes #65
Conversation
Codecov Report
@@ Coverage Diff @@
## main #65 +/- ##
===================================================
+ Coverage 35.58119% 36.44289% +0.86169%
===================================================
Files 17 17
Lines 1127 1147 +20
===================================================
+ Hits 401 418 +17
- Misses 680 682 +2
- Partials 46 47 +1
Continue to review full report at Codecov.
|
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.
Well done!
default: | ||
} | ||
|
||
jobs := t.GetAll() |
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.
Note: seems possible to have a race between this thread and transcode thread. We should expect on studio side to receive a heartbeat callback after transcode-complete callback. We should notify studio team about this quirk.
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.
Good point! I think Studio already has logic where they'll throw away messages if "Completion %" is less than one they've already received, which is quite a nice way of getting some thread safety around this stuff without them implementing a full on state machine
This doesn't do the checking of transcode progress with Mist, but does provide the framework where we'd slot that in.
For now, if an item is in the "Transcode" cache, we update Studio every 15 seconds. I'd guess this is also going to expose some bugs where we're not removing things from the cache when we should be.