File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { runWith } from "firebase-functions"
1+ import { RuntimeOptions , runWith } from "firebase-functions"
22import { DateTime } from "luxon"
33import { JSDOM } from "jsdom"
44import { AssemblyAI } from "assemblyai"
@@ -25,17 +25,23 @@ import fs from "fs"
2525abstract class EventScraper < ListItem , Event extends BaseEvent > {
2626 private schedule
2727 private timeout
28+ private memory
2829
29- constructor ( schedule : string , timeout : number ) {
30+ constructor (
31+ schedule : string ,
32+ timeout : number ,
33+ memory : RuntimeOptions [ "memory" ] = "256MB"
34+ ) {
3035 this . schedule = schedule
3136 this . timeout = timeout
37+ this . memory = memory
3238 }
3339
3440 get function ( ) {
3541 return runWith ( {
3642 timeoutSeconds : this . timeout ,
3743 secrets : [ "ASSEMBLY_API_KEY" ] ,
38- memory : "2GB"
44+ memory : this . memory
3945 } )
4046 . pubsub . schedule ( this . schedule )
4147 . onRun ( ( ) => this . run ( ) )
@@ -293,7 +299,7 @@ const shouldScrapeVideo = async (EventId: number) => {
293299
294300class HearingScraper extends EventScraper < HearingListItem , Hearing > {
295301 constructor ( ) {
296- super ( "every 60 minutes" , 480 )
302+ super ( "every 60 minutes" , 480 , "4GB" )
297303 }
298304
299305 async listEvents ( ) {
You can’t perform that action at this time.
0 commit comments