Skip to content

Commit b7645d7

Browse files
committed
chore: log output is based on an incorrect understanding of the flow, and is misleading
1 parent 90b0859 commit b7645d7

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

packages/job-worker/src/ingest/commit.ts

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -420,31 +420,17 @@ async function updatePartInstancesSegmentIds(
420420
for (const renameRule of renameRules.values()) {
421421
oldSegmentIds.push(...renameRule.fromSegmentIds)
422422
}
423-
const [badPartInstances, badParts] = await Promise.all([
424-
await context.directCollections.PartInstances.findFetch({
425-
rundownId: ingestModel.rundownId,
426-
segmentId: { $in: oldSegmentIds },
427-
}),
428-
await context.directCollections.Parts.findFetch({
429-
rundownId: ingestModel.rundownId,
430-
segmentId: { $in: oldSegmentIds },
431-
}),
432-
])
423+
const badPartInstances = await context.directCollections.PartInstances.findFetch({
424+
rundownId: ingestModel.rundownId,
425+
segmentId: { $in: oldSegmentIds },
426+
})
433427
if (badPartInstances.length > 0) {
434428
logger.error(
435429
`updatePartInstancesSegmentIds: Failed to update all PartInstances using old SegmentIds "${JSON.stringify(
436430
oldSegmentIds
437431
)}": ${JSON.stringify(badPartInstances)}, writeOps: ${JSON.stringify(writeOps)}`
438432
)
439433
}
440-
441-
if (badParts.length > 0) {
442-
logger.error(
443-
`updatePartInstancesSegmentIds: Failed to update all Parts using old SegmentIds "${JSON.stringify(
444-
oldSegmentIds
445-
)}": ${JSON.stringify(badParts)}, writeOps: ${JSON.stringify(writeOps)}`
446-
)
447-
}
448434
// End of the temporary section
449435
}
450436
}

0 commit comments

Comments
 (0)