some upd
This commit is contained in:
@@ -14,6 +14,8 @@ original_send_message = telebot.TeleBot.send_message
|
|||||||
|
|
||||||
|
|
||||||
def send_message_with_try_catch(self, chat_id, text, *args, **kwargs):
|
def send_message_with_try_catch(self, chat_id, text, *args, **kwargs):
|
||||||
|
print("test_msg")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return original_send_message(
|
return original_send_message(
|
||||||
self, chat_id, text, parse_mode="HTML", *args, **kwargs
|
self, chat_id, text, parse_mode="HTML", *args, **kwargs
|
||||||
@@ -25,7 +27,7 @@ def send_message_with_try_catch(self, chat_id, text, *args, **kwargs):
|
|||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
return original_send_message(
|
return original_send_message(
|
||||||
self, chat_id, text, parse_mode="HTML" * args, **kwargs
|
self, chat_id, text, parse_mode="HTML", *args, **kwargs
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Second attempt failed: {e}")
|
print(f"Second attempt failed: {e}")
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ services:
|
|||||||
- ./app:/usr/src/app
|
- ./app:/usr/src/app
|
||||||
depends_on:
|
depends_on:
|
||||||
- mongodb
|
- mongodb
|
||||||
command: sh -c "pip install -r requirements.txt && python main.py"
|
command: sh -c "pip install -r requirements.txt && python -u main.py"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
|
|||||||
Reference in New Issue
Block a user