Open Cosangeles55 opened 4 days ago
backend_fastapi | [2024-10-20 13:32:38,932.932] ERROR - asyncio - Task exception was never retrieved
backend_fastapi | future: <Task finished name='Task-1088' coro=<LeadsMonitoringMessages.run() done, defined at /backend/fast_api_leads/monitoring/mesages.py:50> exception=RuntimeError("Task <Task pending name='Task-1091' coro=<Start.start() running at /usr/local/lib/python3.10/site-packages/pyrogram/methods/utilities/start.py:58> cb=[_chain_future.
loop = asyncio.get_running_loop()
monitoring_thread = LeadsMonitoringMessages(
telegram_api=self.telegram_api,
producer=self.producer,
token=token,
leads_metrics=self.leads_metrics,
loop=loop
)
monitoring_thread.start()
def run(self):
# Запускаем клиент в основном loop
asyncio.set_event_loop(self.loop)
asyncio.run_coroutine_threadsafe(self.init(), self.loop)
Checklist
pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip
and reproduced the issue using the latest development versionDescription
A serious issue: accounts with many chat subscriptions are not receiving updates. @self.client.on_message() @self.client.on_edited_message() Moreover, they operate very, very slowly. It worked fine when I ran it overnight, but after a server restart six hours later, there were zero updates again. It might depend on the message activity in the chats—if there are too many updates, the accounts seem to hang. This issue does not occur in Kurigram...
Steps to reproduce
Change to Kurigram, change to pyrotgfork
Code example
Logs
No response