From b4f5de2060cd8d05696ef796d3e0e8c3c623b154 Mon Sep 17 00:00:00 2001 From: lifegpc Date: Mon, 20 Dec 2021 13:05:07 +0800 Subject: [PATCH] add delay to avoid block by telegram-bot-api --- rssbot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rssbot.py b/rssbot.py index 9757ea7..c160676 100644 --- a/rssbot.py +++ b/rssbot.py @@ -833,7 +833,11 @@ class updateThread(Thread): self._main = main def run(self): + t = None while True: + if t is not None and time() - t < 0.1: + sleep(0.1) + t = time() self._main._updateLoop()