From 66071e16fa627ed5b7fe3334d221d73c2c52b7f9 Mon Sep 17 00:00:00 2001
From: Ian Philips <iansphilips@gmail.com>
Date: Mon, 10 Oct 2022 09:53:42 -0600
Subject: [PATCH] Try without timeout seconds on pubsub

---
 functions/src/update-metrics.ts | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/functions/src/update-metrics.ts b/functions/src/update-metrics.ts
index 5127c889..19bd5640 100644
--- a/functions/src/update-metrics.ts
+++ b/functions/src/update-metrics.ts
@@ -25,10 +25,8 @@ import { newEndpointNoAuth } from './api'
 import { getFunctionUrl } from '../../common/api'
 
 const firestore = admin.firestore()
-const TIMEOUT_SECONDS = 2000
-export const scheduleUpdateMetrics = functions
-  .runWith({ timeoutSeconds: TIMEOUT_SECONDS })
-  .pubsub.schedule('every 15 minutes')
+export const scheduleUpdateMetrics = functions.pubsub
+  .schedule('every 15 minutes')
   .onRun(async () => {
     const response = await fetch(getFunctionUrl('updatemetrics'), {
       headers: {
@@ -45,7 +43,7 @@ export const scheduleUpdateMetrics = functions
   })
 
 export const updatemetrics = newEndpointNoAuth(
-  { timeoutSeconds: TIMEOUT_SECONDS, memory: '8GiB', minInstances: 0 },
+  { timeoutSeconds: 2000, memory: '8GiB', minInstances: 0 },
   async (_req) => {
     await updateMetricsCore()
     return { success: true }