Skip to content

Stream pull startup improvements #2084

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

Merged
merged 3 commits into from
Feb 29, 2024
Merged

Stream pull startup improvements #2084

merged 3 commits into from
Feb 29, 2024

Conversation

mjh1
Copy link
Contributor

@mjh1 mjh1 commented Feb 29, 2024

No description provided.

Copy link

vercel bot commented Feb 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
livepeer-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 29, 2024 6:09pm

await triggerCatalystPullStart(stream, getHLSPlaybackUrl(ingest, stream));
if (!stream.isActive) {
const ingest = await getIngestBase(req);
// TODO run in background
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thomshutt @victorges not sure if it's worth it but maybe we should run the manifest call in the background in case the stream becomes active whilst we're still waiting for a response there..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Can we also wait for other states besides Active? I think that as long as we're confident it's in a state that'll become active (e.g Pending) then that's probably okay

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah good plan

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah no, just seen that the 'pending' label you see in studio dashboard comes after the stream is active so that doesn't help.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah pending is just "active but waiting for stream health data"

@mjh1 mjh1 requested a review from victorges February 29, 2024 17:09
@mjh1 mjh1 marked this pull request as ready for review February 29, 2024 17:09
@mjh1 mjh1 requested a review from a team as a code owner February 29, 2024 17:09
Copy link
Member

@victorges victorges left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1093,11 +1093,22 @@ app.put(
}
}

const ingest = await getIngestBase(req);
await triggerCatalystPullStart(stream, getHLSPlaybackUrl(ingest, stream));
if (!stream.isActive) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might need some logic in case the stream was just nuked above due to pull source changing. This isActive will certainly be true since it was fetched before the nuke above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah hadn't fully realised the significance, good catch

@mjh1 mjh1 merged commit c7cf8c7 into master Feb 29, 2024
@mjh1 mjh1 deleted the mh/pull-start branch February 29, 2024 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants