Skip to content

Commit

Permalink
Set ack_deadline_timeout for subscriptions (#64) (#65)
Browse files Browse the repository at this point in the history
This re-implements the fix from
mozilla-services/socorro#6689

Before this fix, the ack_deadline_timeout is 10 seconds which isn't long
enough for the Socorro processor to process a crash report which causes
the crash id to be available in the subscription again which causes the
crash report to get reprocessed over and over again.
  • Loading branch information
willkg authored Dec 6, 2024
1 parent d5df5fb commit ed18968
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion obs_common/pubsub_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ def create_subscription(ctx, project_id, topic_name, subscription_name):
subscriber = pubsub_v1.SubscriberClient()
subscription_path = subscriber.subscription_path(project_id, subscription_name)
try:
subscriber.create_subscription(name=subscription_path, topic=topic_path)
subscriber.create_subscription(
name=subscription_path,
topic=topic_path,
ack_deadline_seconds=600,
)
click.echo(f"Subscription created: {subscription_path}")
except AlreadyExists:
click.echo("Subscription already created.")
Expand Down

0 comments on commit ed18968

Please sign in to comment.