You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Now when the queue is too big, the activity widget update thread crashes with an error from telegram API
Error message:
[2024-06-11 10:41:11,546] INFO [logger.logger:update_status_message:282] [Bot]: `status_message`for user 123456789 is outdated, updating 0071f41f8bef3a21d2e20f08ef9cc9d923263d9c6ee9b346fd35ac2ac8cff289 -> eed285fd37c01df5c67d4ac630c00dc81e9fdbe96ce07915e68e9b1b1b57269d...
Exception in thread Thread-message-updater:
Traceback (most recent call last):
File "/home/pyinstabot-downloader/app/src/bot.py", line 513, in status_message_updater_thread
update_status_message(user_id=user_id)
File "/home/pyinstabot-downloader/app/src/bot.py", line 286, in update_status_message
editable_message = telegram.send_styled_message(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telegram/telegram.py", line 197, in send_styled_message
response = self.telegram_bot.edit_message_text(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/__init__.py", line 4618, in edit_message_text
result = apihelper.edit_message_text(
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/apihelper.py", line 1356, in edit_message_text
return _make_request(token, method_url, params=payload, method='post')
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/apihelper.py", line 168, in _make_request
json_result = _check_result(method_name, result)
File "/home/pyinstabot-downloader/app/.venv/lib/python3.9/site-packages/telebot/apihelper.py", line 195, in _check_result
raise ApiTelegramException(method_name, result, result_json)
telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: MESSAGE_TOO_LONG
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 980, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 917, in run
self._target(*self._args, **self._kwargs)
File "/home/pyinstabot-downloader/app/src/bot.py", line 523, in status_message_updater_thread
raise FailedMessagesStatusUpdater(exception_context) from exception
modules.exceptions.FailedMessagesStatusUpdater: {'call': 'Thread-message-updater', 'message': 'Failed to update the message with the status of received messages ', 'users': [('123456789', '123456789')], 'user': ('123456789', '123456789'), 'exception': ApiTelegramException('A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: MESSAGE_TOO_LONG')}
Additional context
Information about where the bug is happening:
None
Possible correction
Add output limit of 10 queue items (closest by processing time) to the widget with activity
Screenshots
None
Check list after fixing the bug
The queue returns the next 10 items instead of the full list
Also, remove the pinning function of the activity widget (this is not functional and inconvenient)
The text was updated successfully, but these errors were encountered:
## v2.1.6 - 2024-06-22
### What's Changed
**Full Changelog**: v2.1.5...v2.1.6 by @obervinov in #70
#### 💥 Breaking Changes
* remove unused database `environment` attribute permanent path in the Vault: `configurations/database`
* remove unused environment variable `PROJECT_ENVIRONMENT`
* the automatic queue verification mechanism has been removed. Instead of this method, added functionality to update the queue processing time via a message to the bot
* change the structure of the table `messages`: add a new column `state` and `updated_at`, rename column `timestamp` to `created_at`
#### 🐛 Bug Fixes
* #69
* #62
* #67
* #64
* #65
* Removed duplicates in rights checking
* Small refactoring code
#### 🚀 Features
* Bump dependency versions for modules and workflows
* Add button for rescheduling the queue
Describe the bug
Now when the queue is too big, the activity widget update thread crashes with an error from telegram API
Error message:
Additional context
Information about where the bug is happening:
None
Possible correction
Add output limit of 10 queue items (closest by processing time) to the widget with activity
Screenshots
None
Check list after fixing the bug
The text was updated successfully, but these errors were encountered: