mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Make Dispatcher._run_polling public
This commit is contained in:
parent
1d2c6c91d0
commit
a2cb637ed9
3 changed files with 8 additions and 8 deletions
|
|
@ -151,7 +151,7 @@ class Dispatcher(Router):
|
|||
async for update in self._listen_updates(bot):
|
||||
await self.process_update(update=update, bot=bot, **kwargs)
|
||||
|
||||
async def _run_polling(self, *bots: Bot, **kwargs: Any) -> None:
|
||||
async def start_polling(self, *bots: Bot, **kwargs: Any) -> None:
|
||||
"""
|
||||
Polling runner
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ class Dispatcher(Router):
|
|||
:return:
|
||||
"""
|
||||
try:
|
||||
return asyncio.run(self._run_polling(*bots, **kwargs))
|
||||
return asyncio.run(self.start_polling(*bots, **kwargs))
|
||||
except (KeyboardInterrupt, SystemExit): # pragma: no cover
|
||||
# Allow to graceful shutdown
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue