Reduce "cleanup" slowdown in telegram

This commit is contained in:
Matthias 2021-12-31 12:52:32 +01:00
parent 880ee016a4
commit 550a1eef91

View File

@ -199,8 +199,8 @@ class Telegram(RPCHandler):
self._updater.start_polling( self._updater.start_polling(
bootstrap_retries=-1, bootstrap_retries=-1,
timeout=30, timeout=20,
read_latency=60, read_latency=60, # Assumed transmission latency
drop_pending_updates=True, drop_pending_updates=True,
) )
logger.info( logger.info(
@ -213,6 +213,7 @@ class Telegram(RPCHandler):
Stops all running telegram threads. Stops all running telegram threads.
:return: None :return: None
""" """
# This can take up to `timeout` from the call to `start_polling`.
self._updater.stop() self._updater.stop()
def _format_buy_msg(self, msg: Dict[str, Any]) -> str: def _format_buy_msg(self, msg: Dict[str, Any]) -> str: