fix docker deployment

This commit is contained in:
Alberto-Audrix committed 2026-09-11 14:48:18 +07:00
1 parent ded52d1ece
commit fb0f996776
17 files changed
+49 -18

No files matched your search

+4 -4
View File
@@ -4,7 +4,7 @@ from __future__ import annotations
import logging
import requests
import httpx
from apps.farms.models import Cycle
@@ -32,11 +32,11 @@ def push_close_decision(cycle: Cycle, *, approved: bool) -> None:
payload["end_date"] = cycle.end_date.isoformat()
try:
response = requests.post(
response = httpx.post(
url,
json=payload,
headers={"X-API-Key": city.api_key, "Content-Type": "application/json"},
timeout=30,
timeout=30.0,
)
if response.status_code >= 400:
raise SiteClosePushError(
@@ -44,6 +44,6 @@ def push_close_decision(cycle: Cycle, *, approved: bool) -> None:
)
except SiteClosePushError:
raise
except requests.RequestException as exc:
except httpx.HTTPError as exc:
logger.exception("Push close decision failed for cycle %s", cycle.pk)
raise SiteClosePushError("Gagal kirim keputusan ke situs — coba lagi") from exc