-
Notifications
You must be signed in to change notification settings - Fork 4
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
SOF-1926 Update AdLibActions and -Pieces rank #267
SOF-1926 Update AdLibActions and -Pieces rank #267
Conversation
…Segment ranks are being updated
) | ||
|
||
for (const adLibAction of adLibActionsForSegment) { | ||
const oldRankFraction: number = (adLibAction.display._rank ?? 1) % 1 |
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.
Any reason why ?? 1
instead of ?? 0
? I assume that 0 is the intended default value.
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.
1
was intentional, but mostly to ensure that he rank did have a decimal value.
I don't think that's a strong argument so I have updated it to be 0
.
@@ -432,6 +437,36 @@ export async function handleUpdatedSegmentRanks( | |||
) | |||
} | |||
|
|||
function updateAdLibActionRanks(segmentExternalId: string, newRank: number, cache: CacheForIngest): void { |
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.
It would be nice for clarification that newRank
is the newSegmentRank
.
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.
I'm on the fence, but I have updated it.
Ranks on AdLibActions and -Pieces are also updated when the Segment ranks are being updated