From 379df909fc140d8dc3c5f2a5538d635aeaba1ed1 Mon Sep 17 00:00:00 2001 From: Julian Gula Date: Fri, 27 Sep 2024 13:44:09 +0200 Subject: [PATCH] Updated RetryOnExceptionError class for handling task retries with custom logic - Implement updating callbackAfterSeconds inside task by using retry_delay_seconds --- frinx/common/worker/exception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frinx/common/worker/exception.py b/frinx/common/worker/exception.py index bf32342..a48e436 100644 --- a/frinx/common/worker/exception.py +++ b/frinx/common/worker/exception.py @@ -38,7 +38,7 @@ def update_task_result(self, task, task_result: TaskResult) -> TaskResult: if self._should_retry(current_poll_count): task_result.status = TaskResultStatus.IN_PROGRESS - # task_result.callable_after_seconds = self.retry_delay # TODO: Setting delay before it can be retried + task["callbackAfterSeconds"] = self.retry_delay_seconds else: task_result.status = TaskResultStatus.FAILED