Skip to content

Commit b20367b

Browse files
committed
chore: add logging for troubleshooting
1 parent 9e24299 commit b20367b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ async function updatePartInstancesSegmentIds(
365365

366366
const writeOps: AnyBulkWriteOperation<DBPartInstance>[] = []
367367

368+
logger.debug(`updatePartInstancesSegmentIds: renameRules: ${JSON.stringify(renameRules)}`)
369+
368370
for (const [newSegmentId, rule] of rulesInOrder) {
369371
if (rule.fromSegmentIds.length) {
370372
writeOps.push({

packages/job-worker/src/playout/infinites.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,24 @@ export function getPieceInstancesForPart(
345345
})
346346
.catch((e) => logger.error(e))
347347

348+
context.directCollections.PartInstances.findOne({
349+
_id: playingPartInstance.partInstance._id,
350+
})
351+
.then((partInstance) => {
352+
if (!partInstance) {
353+
logger.error(
354+
`TROUBLESHOOT: Segment not found, no partInstance "${playingPartInstance.partInstance._id}" in DB`
355+
)
356+
} else {
357+
logger.error(
358+
`TROUBLESHOOT: Segment not found, partInstance "${partInstance._id}": ${JSON.stringify(
359+
partInstance
360+
)}`
361+
)
362+
}
363+
})
364+
.catch((e) => logger.error(e))
365+
348366
throw new Error(
349367
`Segment "${playingPartInstance.partInstance.segmentId}" in Rundown "${
350368
playingRundown.rundown._id

0 commit comments

Comments
 (0)