From 53432ec648b883fec071dbea76071abf61d468a9 Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Tue, 29 Aug 2017 15:03:11 +0200 Subject: [PATCH] Benutze j.run_repeating(), da j.put() veraltet ist und versuche unendlich lange, bei einem Timeout neu zu verbinden --- bot.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 882521a..7f82869 100644 --- a/bot.py +++ b/bot.py @@ -414,11 +414,10 @@ def main(): dp.add_error_handler(error) # cron - job_minute = Job(check_rss, 60.0) - j.put(job_minute, next_t=10.0) + j.run_repeating(check_rss, interval=60.0, first=15.0) # Start the Bot - updater.start_polling(timeout=20, clean=True) + updater.start_polling(timeout=20, clean=True, bootstrap_retries=-1, allowed_updates=["message"]) # Run the bot until the you presses Ctrl-C or the process receives SIGINT, # SIGTERM or SIGABRT. This should be used most of the time, since