Try without timeout seconds on pubsub
This commit is contained in:
parent
b3136ebcac
commit
66071e16fa
|
@ -25,10 +25,8 @@ import { newEndpointNoAuth } from './api'
|
||||||
import { getFunctionUrl } from '../../common/api'
|
import { getFunctionUrl } from '../../common/api'
|
||||||
|
|
||||||
const firestore = admin.firestore()
|
const firestore = admin.firestore()
|
||||||
const TIMEOUT_SECONDS = 2000
|
export const scheduleUpdateMetrics = functions.pubsub
|
||||||
export const scheduleUpdateMetrics = functions
|
.schedule('every 15 minutes')
|
||||||
.runWith({ timeoutSeconds: TIMEOUT_SECONDS })
|
|
||||||
.pubsub.schedule('every 15 minutes')
|
|
||||||
.onRun(async () => {
|
.onRun(async () => {
|
||||||
const response = await fetch(getFunctionUrl('updatemetrics'), {
|
const response = await fetch(getFunctionUrl('updatemetrics'), {
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -45,7 +43,7 @@ export const scheduleUpdateMetrics = functions
|
||||||
})
|
})
|
||||||
|
|
||||||
export const updatemetrics = newEndpointNoAuth(
|
export const updatemetrics = newEndpointNoAuth(
|
||||||
{ timeoutSeconds: TIMEOUT_SECONDS, memory: '8GiB', minInstances: 0 },
|
{ timeoutSeconds: 2000, memory: '8GiB', minInstances: 0 },
|
||||||
async (_req) => {
|
async (_req) => {
|
||||||
await updateMetricsCore()
|
await updateMetricsCore()
|
||||||
return { success: true }
|
return { success: true }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user