You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError("retry only on ValueError or KeyError")
54
+
```
55
+
37
56
## Smart retry middleware
38
57
39
58
The `SmartRetryMiddleware` automatically retries tasks with flexible delay settings and retry strategies when errors occur. This is particularly useful when tasks fail due to temporary issues, such as network errors or temporary unavailability of external services.
@@ -78,6 +97,13 @@ async def my_task():
78
97
*`retry_on_error`: Enables the retry mechanism for the specific task.
79
98
*`max_retries`: Maximum number of retries (overrides middleware default).
80
99
*`delay`: Initial delay before retrying the task, in seconds.
100
+
*`types_of_exceptions`: Exception types that trigger a retry for this task. Overrides the broker-wide `types_of_exceptions` passed to the middleware.
0 commit comments