Skip to content
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: add modal for alignment and latency config #34

Merged
merged 7 commits into from
Oct 16, 2024

Conversation

Saelmala
Copy link

@Saelmala Saelmala commented Oct 10, 2024

This PR:

  • Adds the possibility to configure alignment and latency for a pipeline stream during a running production.
    Steps to do so:
  1. Start a production, and click the settings button on the source card.

  2. Set new values

  3. On save: alignment_ms and latency is saved on the pipeline with the source's sourceId as a key. A PATCH request to update the stream's alignment with the new value is also done.
    I also added error handeling in case the latency value is set to higher value than the alignment, since if that's the case it will not be possibly to start a production.

  4. On stop and start, there are checks when each stream is created to see if the alignment/latency for that source on each respective pipeline and in that case that value is used, otherwise the pipeline's 'global' value is used.

  • I also needed to make a few adjustments to other functions because they would give errors since ingestUuid can now be undefined.

Images

Settings button on source card:

Configuration modal with initial values

After a stop and start of the production, the new values that have been saved in the database are shown in the modal for that source:

Error handeling if latency > alignment:

@Saelmala Saelmala self-assigned this Oct 10, 2024
@@ -839,6 +850,46 @@ export async function startProduction(
input_slot: source.input_slot
};
}),
production_settings: {
...production.production_settings,
pipelines: await Promise.all(

Choose a reason for hiding this comment

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

This works? Nice!

@Saelmala Saelmala marked this pull request as draft October 10, 2024 13:33
@Saelmala
Copy link
Author

Converted this PR to a draft as a different settings-button position will be needed with newest main version

@Saelmala
Copy link
Author

Noticed a bug if you added a source during a running production and opened its settings-modal, will update PR with that fix

@Saelmala Saelmala marked this pull request as ready for review October 11, 2024 10:26
Copy link

@malmen237 malmen237 left a comment

Choose a reason for hiding this comment

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

LGTM

@Saelmala Saelmala merged commit f611fd7 into main Oct 16, 2024
4 checks passed
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