feat: implement rolling half-hour report windows anchored to service startup time
This commit is contained in:
@@ -26,6 +26,7 @@ def build_app(config_path: str | Path | None = None) -> dict:
|
||||
project_root = resolve_project_root(resolved_config_path)
|
||||
event_sink_path = resolve_project_path(project_root, config.event_sink.path)
|
||||
gallery_dir = resolve_project_path(project_root, config.staff.gallery_dir)
|
||||
startup_time = datetime.now().astimezone()
|
||||
|
||||
return {
|
||||
"config": config,
|
||||
@@ -51,6 +52,7 @@ def build_app(config_path: str | Path | None = None) -> dict:
|
||||
normal_count_threshold=config.thresholds.normal_count_threshold,
|
||||
pause_timeout_seconds=config.thresholds.pause_timeout_seconds,
|
||||
alert_cooldown_seconds=config.thresholds.alert_cooldown_seconds,
|
||||
report_window_start=startup_time,
|
||||
),
|
||||
"notifier": lambda path, event: dispatch_json_event(
|
||||
path,
|
||||
|
||||
Reference in New Issue
Block a user