Implements opportunity to change request timeouts

This commit is contained in:
Alex RootJunior 2019-04-17 23:24:23 +03:00
parent 71c49fd08b
commit beca19b5e2
3 changed files with 71 additions and 8 deletions

View file

@ -23,7 +23,7 @@ def _setup_callbacks(executor, on_startup=None, on_shutdown=None):
def start_polling(dispatcher, *, loop=None, skip_updates=False, reset_webhook=True,
on_startup=None, on_shutdown=None, timeout=None, fast=True):
on_startup=None, on_shutdown=None, timeout=20, fast=True):
"""
Start bot in long-polling mode
@ -291,7 +291,7 @@ class Executor:
self.set_webhook(webhook_path=webhook_path, request_handler=request_handler, route_name=route_name)
self.run_app(**kwargs)
def start_polling(self, reset_webhook=None, timeout=None, fast=True):
def start_polling(self, reset_webhook=None, timeout=20, fast=True):
"""
Start bot in long-polling mode