Sprint 16: Chat-Fotos/Online/Read-Receipts, Gesundheit-Dokumente löschen, Bugfixes
- Chat: Foto-Versand (POST /api/chat/conversations/{id}/upload, media_url/media_type)
- Chat: Online-Indikator (last_seen Heartbeat, grüner Dot, 3min-Fenster)
- Chat: Read Receipts (read_at, Einzel-/Doppelhaken-Icons)
- Gesundheit: Dokument löschen (DELETE .../dokument, Datei + DB-Eintrag)
- Bug: events.user_id NOT NULL → nullable (Table-Recreation-Migration)
- Bug: scheduler INSERT user_id 0 → NULL
- Bug: Wikidata Rate-Limit: sleep 0.3s→1.0s, retries 2→4, exponentielles Backoff
- SW: by-v146, APP_VER 119
This commit is contained in:
parent
34f29f9d0a
commit
a7753c9cf5
15 changed files with 375 additions and 43 deletions
|
|
@ -165,10 +165,10 @@ async def mirror_wikidata_photos():
|
|||
|
||||
# Wikimedia Commons: append ?width=600 for scaled download
|
||||
fetch_url = img_url if "?" in img_url else img_url + "?width=600"
|
||||
retries = 2
|
||||
retries = 4
|
||||
for attempt in range(retries):
|
||||
try:
|
||||
await asyncio.sleep(0.3) # 300ms zwischen Requests → ~3/s
|
||||
await asyncio.sleep(1.0 * (attempt + 1)) # exponentiell: 1s, 2s, 3s, 4s
|
||||
r = await client.get(fetch_url)
|
||||
if r.status_code == 200 and r.headers.get("content-type", "").startswith("image"):
|
||||
with open(local_path, "wb") as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue