mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-06-12 10:29:42 +08:00
⚡️ 转移启动函数
This commit is contained in:
parent
8e59babf1c
commit
36d015e7d7
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -18,4 +18,5 @@
|
||||
"basedpyright.analysis.extraPaths": [
|
||||
"${workspaceFolder}/../../../"
|
||||
],
|
||||
"python.analysis.typeCheckingMode": "off",
|
||||
}
|
||||
|
@ -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
|
12
StarRailUID/starrailuid_start/main.py
Normal file
12
StarRailUID/starrailuid_start/main.py
Normal 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)
|
Loading…
x
Reference in New Issue
Block a user