Skip to content

Commit 9349a90

Browse files
committed
Fix ack dead line time
1 parent 2aee3b7 commit 9349a90

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cloudbuild.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ steps:
3232
- --event-filters=type=google.cloud.storage.object.v1.finalized
3333
- --event-filters=bucket=${_TRIGGER_BUCKET}
3434
- --service-account=${_SERVICE_ACCOUNT_EMAIL}
35+
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
36+
entrypoint: bash
37+
args:
38+
- -c
39+
- |
40+
SUBSCRIPTION=$(gcloud eventarc triggers describe "${_TRIGGER_NAME}" --location="${_REGION}" --format="value(transport.pubsub.subscription)")
41+
if [ ! -z "$SUBSCRIPTION" ]; then
42+
echo "Updating subscription ${SUBSCRIPTION} ack-deadline to 600s"
43+
gcloud pubsub subscriptions update "${SUBSCRIPTION}" --ack-deadline=600
44+
fi
3545
3646
options:
3747
logging: CLOUD_LOGGING_ONLY

0 commit comments

Comments
 (0)