-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Debug event scraper #1760
Debug event scraper #1760
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
functions/src/events/scrapeEvents.ts
Outdated
const eventData = eventInDb.data() | ||
try { | ||
Hearing.check(eventData) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this throws, wouldn't it just throw again in the next Hearing.check
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just being thorough - are we sure this can successfully load a pre-existing hearing from the DB (which will not have videoUrl
/videoFetchedAt
/videoAssemblyId
set at all - not even to null)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this throws, wouldn't it just throw again in the next Hearing.check?
eeps, removing that debug code.
And just being thorough - are we sure this can successfully load a pre-existing hearing from the DB (which will not have videoUrl/videoFetchedAt/videoAssemblyId set at all - not even to null)?
good call, switching back to optional
types so the check will pass, and conditionally adding them.
There may still be more work to do here, but since this is in a strictly better state than it was before, I'm comfortable getting this out to QA to help debug. |
Fixes fatal bugs in the event scraper.