We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b674457 commit 02f642bCopy full SHA for 02f642b
taskiq/middlewares/smart_retry_middleware.py
@@ -3,6 +3,7 @@
3
import datetime
4
import random
5
from logging import getLogger
6
+from types import NoneType
7
from typing import Any
8
9
from taskiq import ScheduleSource
@@ -61,10 +62,7 @@ def __init__(
61
62
self.max_delay_exponent = max_delay_exponent
63
self.schedule_source = schedule_source
64
- if schedule_source is not None and not isinstance(
65
- schedule_source,
66
- ScheduleSource,
67
- ):
+ if not isinstance(schedule_source, (ScheduleSource, NoneType)):
68
raise TypeError(
69
"schedule_source must be an instance of ScheduleSource or None",
70
)
0 commit comments