From a6a3d80fb511997d75241579cac84b5334d6fc79 Mon Sep 17 00:00:00 2001 From: qwerdvd <105906879+qwerdvd@users.noreply.github.com> Date: Fri, 12 Jan 2024 13:45:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8F=A6=E8=B5=B7=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArknightsUID/arknightsuid_start/start.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ArknightsUID/arknightsuid_start/start.py b/ArknightsUID/arknightsuid_start/start.py index 38208fd..2e4eb14 100644 --- a/ArknightsUID/arknightsuid_start/start.py +++ b/ArknightsUID/arknightsuid_start/start.py @@ -1,12 +1,18 @@ import asyncio +import threading + +from gsuid_core.logger import logger from ..arknightsuid_resource import startup from ..utils.database.startup import ark_adapter async def all_start(): - await startup() - await ark_adapter() + try: + await startup() + await ark_adapter() + except Exception as e: + logger.exception(e) -asyncio.run(all_start()) +threading.Thread(target=lambda: asyncio.run(all_start()), daemon=True).start()