Implement running scheduled tasks
This commit is contained in:
@@ -153,7 +153,11 @@ class NotificationRuleData(object):
|
||||
window_unit = window[-1]
|
||||
if window_unit not in SECONDS_PER_UNIT:
|
||||
raise RuleParseError(
|
||||
f"Window unit must be one of {', '.join(SECONDS_PER_UNIT.keys())}, not '{window_unit}'",
|
||||
(
|
||||
"Window unit must be one of "
|
||||
f"{', '.join(SECONDS_PER_UNIT.keys())},"
|
||||
f" not '{window_unit}'"
|
||||
),
|
||||
"window",
|
||||
)
|
||||
window_seconds = window_number * SECONDS_PER_UNIT[window_unit]
|
||||
|
||||
Reference in New Issue
Block a user