chore: fix ruff lint (webhooks v2) + Windows-safe test teardown
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user