sleep for 1 second to avoid rate limiting

This commit is contained in:
Hongbo Wu
2024-07-22 18:36:11 +08:00
parent 95657e3d3e
commit 110f537e72
4 changed files with 54 additions and 39 deletions

View File

@ -3,14 +3,6 @@ import { CloudTasksClient, protos } from '@google-cloud/tasks'
const cloudTask = new CloudTasksClient()
export const emailUserUrl = () => {
const envar = process.env.INTERNAL_SVC_ENDPOINT
if (envar) {
return envar + 'api/user/email'
}
throw 'INTERNAL_SVC_ENDPOINT not set'
}
export const CONTENT_FETCH_URL = process.env.CONTENT_FETCH_GCF_URL
export const createCloudTask = async (