mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 16:04:51 +00:00
Replace create_task with ensure_future for compatibility
This commit is contained in:
parent
8700e3a0f3
commit
94603f1ff2
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue