Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZO-4649: Configure max retry for speech webhook #617

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/docs/changelog/ZO-4649.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ZO-4649: Configure max retries for speech webhook celery task
4 changes: 3 additions & 1 deletion core/src/zeit/speech/json/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def SPEECH_WEBHOOK_TASK(self, payload: dict):
speech.delete(payload)
except zeit.cms.checkout.interfaces.CheckinCheckoutError:
config = zope.app.appsetup.product.getProductConfiguration('zeit.speech')
self.retry(countdown=int(config['retry-delay-seconds']))
self.retry(
countdown=int(config['retry-delay-seconds']), max_retries=int(config['max-retries'])
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.



def validate_request(payload: dict):
Expand Down
1 change: 1 addition & 0 deletions core/src/zeit/speech/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
principal zope.speech
speech-folder tts
retry-delay-seconds 0
max-retries 1
</product-config>
"""

Expand Down
Loading