-
Notifications
You must be signed in to change notification settings - Fork 55
feat: replace wasActive
in onRundownActivate with context
#1514
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
base: release53
Are you sure you want to change the base?
feat: replace wasActive
in onRundownActivate with context
#1514
Conversation
…rentState in RundownActivationContext. Also changed the algorithm in handleResetRundownPlaylist, so that activateRundownPlaylist always runs This is to provide better context for blueprints, so that they can determine if a RundownPlaylist is being Activated from idle, from Rehersal or a Reset
// Only update the timeline if this is the active playlist | ||
await updateTimeline(context, playoutModel) | ||
} | ||
await activateRundownPlaylist(context, playoutModel, data.activate !== 'active', true) // Activate rundown |
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.
This looks to be a change in behaviour; if activate
is undefined then activateRundownPlaylist
will now be called, when it wasnt previously.
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.
Yes, as I explained under "New behavior" this is my intent.
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.
https://github.com/user-attachments/assets/988ee625-7d60-4ecc-a0e6-274c346e5831
That causes the playlist to be activated to rehearsal during a 'normal' reset of the rundown
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.
After having talked to @Julusian the behavior is now closer to how it was originally, with only resetRundownPlaylist
being called if the playlist is inactive.
# Conflicts: # packages/job-worker/src/playout/activePlaylistActions.ts # packages/job-worker/src/playout/activePlaylistJobs.ts # packages/job-worker/src/playout/lib.ts
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
There is a linter and unit test failure, both look to be quick fixes
About the Contributor
This pull request is posted on behalf of the NRK.
Type of Contribution
This is a: BREAKING CHANGE to the
blueprint-integration
interface.Current Behavior
Use case:
We (NRK) need to trigger a TSR Action from blueprints at the time a user does a "Reset Rundown".
The problem is that neither one of the blueprints
onRundownActivate
noronRundownDeactivate
hooks are called upon a "Reset Rundown".New Behavior
This PR does two things:
activateRundownPlaylist
(which does a reset internally)wasActive
fromonRundownActivate?: (context: IRundownActivationContext, wasActive: boolean) => Promise<void>
(this is a BREAKING CHANGE) and instead addspreviousState
andcurrentState
toIRundownActivationContext
This allows our blueprints to trigger our TSR Action from
onRundownActivate
Testing
Affected areas
This PR affects the blueprints-integration interface.
This PR potentially affects the Reset Rundown method.
Time Frame
We've merged this into our local R52 branch, we would like to get this merged into the in-development release.
Other Information
Status