loadbalancer fixes

This commit is contained in:
Zsolt Ero
2024-06-24 16:42:40 +02:00
parent 8c938f9bb1
commit 5f27cade7a
4 changed files with 39 additions and 13 deletions

View File

@@ -2,6 +2,8 @@ import requests
def telegram_send_message(message, bot_token, chat_id):
print(message)
url = f'https://api.telegram.org/bot{bot_token}/sendMessage'
payload = {'chat_id': chat_id, 'text': message}
@@ -9,6 +11,6 @@ def telegram_send_message(message, bot_token, chat_id):
response = requests.post(url, data=payload)
if response.status_code == 200:
print('Message sent successfully!')
print(' Message sent successfully!')
else:
print('Failed to send message:', response.text)
print(' Failed to send message:', response.text)