mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-30 05:48:14 +00:00
Replace create_task with ensure_future for compatibility
This commit is contained in:
parent
8700e3a0f3
commit
94603f1ff2
@ -130,7 +130,7 @@ class Dispatcher:
|
|||||||
for lock in self.locks_list:
|
for lock in self.locks_list:
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
asyncio.get_event_loop().create_task(fn())
|
asyncio.ensure_future(fn())
|
||||||
|
|
||||||
def remove_handler(self, handler, group: int):
|
def remove_handler(self, handler, group: int):
|
||||||
async def fn():
|
async def fn():
|
||||||
@ -146,7 +146,7 @@ class Dispatcher:
|
|||||||
for lock in self.locks_list:
|
for lock in self.locks_list:
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
asyncio.get_event_loop().create_task(fn())
|
asyncio.ensure_future(fn())
|
||||||
|
|
||||||
async def update_worker(self, lock):
|
async def update_worker(self, lock):
|
||||||
while True:
|
while True:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user