Skip to content

Commit b83f086

Browse files
committed
Add debugging to find runnaway scraping bug
1 parent c9a2396 commit b83f086

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

functions/src/events/scrapeEvents.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ abstract class EventScraper<ListItem, Event extends BaseEvent> {
6060
if (event.startsAt.toMillis() < upcomingOrRecentCutoff.toMillis()) break
6161

6262
writer.set(db.doc(`/events/${event.id}`), event, { merge: true })
63+
64+
console.log("event in run()", event)
6365
}
6466

6567
await writer.close()
@@ -278,6 +280,8 @@ const shouldScrapeVideo = async (EventId: number) => {
278280
.get()
279281
const eventData = eventInDb.data()
280282

283+
console.log("eventData in shouldScrapeVideo()", eventData)
284+
281285
if (!eventData) {
282286
return false
283287
}
@@ -301,6 +305,8 @@ class HearingScraper extends EventScraper<HearingListItem, Hearing> {
301305
const data = await api.getHearing(EventId)
302306
const content = HearingContent.check(data)
303307

308+
console.log("content in getEvent()", content)
309+
304310
if (await shouldScrapeVideo(EventId)) {
305311
try {
306312
const maybeVideoUrl = await getHearingVideoUrl(EventId)

0 commit comments

Comments
 (0)