Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -110,7 +110,7 @@ async def webhook(request: Request) -> Dict[str, Any]:
|
|
| 110 |
return {"success": True}
|
| 111 |
except requests.exceptions.HTTPError as e:
|
| 112 |
if "429" in str(e) or "rate-limited" in str(e):
|
| 113 |
-
time.sleep((2 ** attempt) *
|
| 114 |
continue
|
| 115 |
raise HTTPException(status_code=500, detail=f"Failed to post comment: {str(e)}")
|
| 116 |
|
|
|
|
| 110 |
return {"success": True}
|
| 111 |
except requests.exceptions.HTTPError as e:
|
| 112 |
if "429" in str(e) or "rate-limited" in str(e):
|
| 113 |
+
time.sleep((2 ** attempt) * 10) # Backoff exponentiel plus long
|
| 114 |
continue
|
| 115 |
raise HTTPException(status_code=500, detail=f"Failed to post comment: {str(e)}")
|
| 116 |
|