防止协程执行完之前就被GC

This commit is contained in:
John Smith
2024-01-25 20:11:42 +08:00
parent 1772caebe3
commit ee3b11e001
7 changed files with 35 additions and 14 deletions

View File

@@ -3,13 +3,14 @@ import asyncio
import aiohttp
import utils.async_io
import utils.request
VERSION = 'v1.8.2'
def check_update():
asyncio.get_running_loop().create_task(_do_check_update())
utils.async_io.create_task_with_ref(_do_check_update())
async def _do_check_update():