diff --git a/core/docs/changelog/ZO-4649.change b/core/docs/changelog/ZO-4649.change new file mode 100644 index 0000000000..578faf926e --- /dev/null +++ b/core/docs/changelog/ZO-4649.change @@ -0,0 +1 @@ +ZO-4649: Configure max retries for speech webhook celery task diff --git a/core/src/zeit/speech/json/webhook.py b/core/src/zeit/speech/json/webhook.py index 80ab1c6d01..7de00597e0 100644 --- a/core/src/zeit/speech/json/webhook.py +++ b/core/src/zeit/speech/json/webhook.py @@ -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']) + ) def validate_request(payload: dict): diff --git a/core/src/zeit/speech/testing.py b/core/src/zeit/speech/testing.py index ca4fee0e24..a7af262522 100644 --- a/core/src/zeit/speech/testing.py +++ b/core/src/zeit/speech/testing.py @@ -17,6 +17,7 @@ principal zope.speech speech-folder tts retry-delay-seconds 0 + max-retries 1 """