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 4a616c4 commit 73c2c57Copy full SHA for 73c2c57
1 file changed
olli/config.py
@@ -72,6 +72,21 @@ def must_be_above_zero(cls, value: int) -> int:
72
73
return value
74
75
+ @validator("tokens")
76
+ def warn_above_ten(cls, value: list[TokenConfig]) -> list[TokenConfig]:
77
+ """
78
+ Warn a user if they have more than 10 tokens.
79
+
80
+ This is because we cannot handle more than 10 token triggers at once until we
81
+ batch triggers into groups of 10 to distribute to the webhook.
82
83
+ if len(value) > 10:
84
+ logger.warning(
85
+ "More than 10 token triggers in one period cannot be handled, be careful."
86
+ )
87
88
+ return value
89
90
91
class OlliConfig(BaseModel):
92
"""Class representing root Olli config."""
0 commit comments