From 1a750a42c4a6af3f55a4d1bb78f1adbff787dc0e Mon Sep 17 00:00:00 2001 From: Boldizsar Mezei Date: Sat, 11 May 2024 20:39:07 +0200 Subject: [PATCH] Fix deploy --- packages/functions/deploy.script.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/functions/deploy.script.ts b/packages/functions/deploy.script.ts index 95d4b2846..78acb9c36 100644 --- a/packages/functions/deploy.script.ts +++ b/packages/functions/deploy.script.ts @@ -7,7 +7,6 @@ import { CloudFunctions } from './src/runtime/common'; import * as onScheduled from './src/runtime/cron/index'; import { ScheduledFunction } from './src/runtime/cron/scheduled'; import * as onRequests from './src/runtime/https/index'; -import * as onStorage from './src/runtime/storage/index'; import * as onTriggers from './src/runtime/trigger/index'; const file = './deploy.sh'; @@ -31,11 +30,8 @@ const deployServices = () => { ...flattenObject(onRequests), ...flattenObject(onTriggers), ...flattenObject(onScheduled), - ...flattenObject(onStorage), - }).forEach(([name, value], index) => { - if (index % 50 === 0) { - fs.appendFileSync(file, 'wait\n\n'); - } + // ...flattenObject(onStorage), + }).forEach(([name, value]) => { const options = (value as CloudFunctions).runtimeOptions; let command = `gcloud run deploy ${name} \\ @@ -86,6 +82,7 @@ const deployServices = () => { // }; const deployFirestoreTriggers = () => { + fs.appendFileSync(file, 'echo deployFirestoreTriggers\n\n'); Object.entries(flattenObject(onTriggers)).forEach(([name]) => { const command = `if ! gcloud pubsub topics list --format="value(name)" | grep -q "${name}"; then gcloud pubsub topics create "${name}"\nfi &\n\n`; @@ -109,6 +106,7 @@ const deployFirestoreTriggers = () => { }; const deployCronTriggers = () => { + fs.appendFileSync(file, 'echo deployCronTriggers\n\n'); Object.entries(flattenObject(onScheduled)).forEach(([name]) => { const command = `if ! gcloud pubsub topics list --format="value(name)" | grep -q "${name}"; then gcloud pubsub topics create "${name}"\nfi &\n\n`; @@ -148,9 +146,10 @@ const deployCronTriggers = () => { }; const setMaxAckDeadline = () => { + fs.appendFileSync(file, 'echo setMaxAckDeadline\n\n'); fs.appendFileSync( file, - `for SUBSCRIPTION_NAME in $(gcloud pubsub subscriptions list --format="value(name)")\n`, + `for SUBSCRIPTION_NAME in $(gcloud pubsub subscriptions list --format="value(name)" | grep -v 'subs-onupsert')\n`, ); fs.appendFileSync(file, `do\n`); fs.appendFileSync( @@ -162,6 +161,7 @@ const setMaxAckDeadline = () => { }; const createUpsertTopic = () => { + fs.appendFileSync(file, 'echo createUpsertTopic\n\n'); const command = `if ! gcloud pubsub topics list --format="value(name)" | grep -q onupsert; then gcloud pubsub topics create onupsert\nfi \n\n`; fs.appendFileSync(file, command);