Skip to content

Commit ced307f

Browse files
authored
Merge pull request #1849 from boazsender/automated-transcriptions
Add proactive video-prop saving
2 parents 89c4237 + ae1ba80 commit ced307f

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)