fix: complete remaining 8 optimization items
- HTTP connection pooling: UpstreamClient & WebsiteClient reuse httpx.Client - Deduplicate decimal_string into shared app/utils/number.py - Split scheduler transaction: snapshot write → webhook/website sync in separate sessions - Remove hardcoded 170.106.100.210 migration from database.py - Reset consecutive_failures on upstream update - Healthcheck: install curl, replace python -c with curl -f - Add .dockerignore to reduce build context - Frontend: add axios-retry with exponential backoff (5xx/network errors only)
This commit is contained in:
@@ -121,6 +121,8 @@ def update_upstream(
|
||||
data["base_url"] = data["base_url"].rstrip("/")
|
||||
for k, v in data.items():
|
||||
setattr(u, k, v)
|
||||
# Reset failure counter on any update — the user may have fixed the issue
|
||||
u.consecutive_failures = 0
|
||||
u.updated_at = datetime.now(timezone.utc)
|
||||
db.commit()
|
||||
db.refresh(u)
|
||||
|
||||
Reference in New Issue
Block a user