Benutze j.run_repeating(), da j.put() veraltet ist und versuche unendlich lange, bei einem Timeout neu zu verbinden
This commit is contained in:
parent
f9b8dfb247
commit
53432ec648
5
bot.py
5
bot.py
@ -414,11 +414,10 @@ def main():
|
|||||||
dp.add_error_handler(error)
|
dp.add_error_handler(error)
|
||||||
|
|
||||||
# cron
|
# cron
|
||||||
job_minute = Job(check_rss, 60.0)
|
j.run_repeating(check_rss, interval=60.0, first=15.0)
|
||||||
j.put(job_minute, next_t=10.0)
|
|
||||||
|
|
||||||
# Start the Bot
|
# 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,
|
# 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
|
# SIGTERM or SIGABRT. This should be used most of the time, since
|
||||||
|
Reference in New Issue
Block a user