️ 转移启动函数

This commit is contained in:
KimigaiiWuyi 2025-05-18 21:14:14 +08:00
parent 8e59babf1c
commit 36d015e7d7
3 changed files with 14 additions and 16 deletions

View File

@ -18,4 +18,5 @@
"basedpyright.analysis.extraPaths": [
"${workspaceFolder}/../../../"
],
"python.analysis.typeCheckingMode": "off",
}

View File

@ -1,16 +1 @@
import asyncio
import threading
from gsuid_core.logger import logger
from ..starrailuid_resource import startup
async def all_start():
try:
await startup()
except Exception as e:
logger.exception(e)
threading.Thread(target=lambda: asyncio.run(all_start()), daemon=True).start()
from .main import all_start as AST # noqa: F401

View File

@ -0,0 +1,12 @@
from gsuid_core.logger import logger
from ..starrailuid_resource import startup
from gsuid_core.server import on_core_start
@on_core_start
async def all_start():
try:
await startup()
except Exception as e:
logger.exception(e)