Add VPS deployment guide and production fixes

This commit is contained in:
Shanmuga Krishnan S M
2026-08-03 11:20:35 +05:30
parent fb8bb87c74
commit ab759e37fd
3 changed files with 350 additions and 2 deletions

View File

@@ -315,8 +315,13 @@ def telegram_polling_thread():
response = requests.get(url, params=params, timeout=25)
data = response.json()
if not data.get("ok"):
logging.error(f"Telegram API getUpdates error: {data}")
time.sleep(5)
error_code = data.get("error_code")
if error_code == 409:
logging.warning("Telegram API 409 Conflict: Another bot instance is active. Sleeping 10s before retrying...")
time.sleep(10)
else:
logging.error(f"Telegram API getUpdates error: {data}")
time.sleep(5)
continue
updates = data.get("result", [])