chore: fix ruff lint (webhooks v2) + Windows-safe test teardown
FlowDeck CI / lint (push) Successful in 1m21s
FlowDeck CI / test (push) Failing after 10m1s
FlowDeck CI / docker (push) Skipped

This commit is contained in:
2026-09-21 21:58:47 -04:00
parent 2fceed0da2
commit b56b181c3e
5 changed files with 40 additions and 44 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ def _log_delivery(webhook_id: int, event: str, status: str, http_code: int | Non
async def _deliver_once(client: httpx.AsyncClient, url: str, event: str,
payload: dict, secret: str) -> tuple[int | None, str]:
"""Single POST attempt. Returns (http_code, error).
Includes HMAC-SHA256 signature in X-FlowDeck-Signature header.
"""
body = json.dumps({"event": event, **payload}).encode()
@@ -144,7 +144,7 @@ async def deliver_to_sub(sub_id: int, url: str, event: str, payload: dict,
Returns True on success. Failures are re-queued via ``next_retry_at`` so
the background scheduler can pick them up even if this process restarts.
Retry schedule: 2s, 10s, 60s (3 retries total + initial attempt).
"""
own_client = _client is None