Skip to content

Commit ae1ba80

Browse files
committed
Add proactive video-prop saving
1 parent 93175af commit ae1ba80

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

functions/src/events/scrapeEvents.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,15 @@ class HearingScraper extends EventScraper<HearingListItem, Hearing> {
316316
EventId
317317
})
318318

319+
// Immediately save video info to prevent reprocessing
320+
// since the bulkWriter does not save the video properties
321+
// returned from this method.
322+
await db.collection("events").doc(`hearing-${EventId}`).update({
323+
videoURL: maybeVideoUrl,
324+
videoFetchedAt: Timestamp.now(),
325+
videoTranscriptionId: transcriptId
326+
})
327+
319328
return {
320329
id: `hearing-${EventId}`,
321330
type: "hearing",

0 commit comments

Comments
 (0)