✨ 新增每天00:30检查签到文件

This commit is contained in:
2025-05-29 18:20:03 +08:00
parent a475d0188b
commit 1ef506d2fd
31 changed files with 172 additions and 24 deletions
+7 -2
View File
@@ -8,7 +8,7 @@ import aiosqlite
from zhenxun.services.log import logger
from ..config import g_sPlantPath
from ..config import g_bIsDebug, g_sPlantPath
class CPlantManager:
@@ -27,7 +27,12 @@ class CPlantManager:
async def init(cls) -> bool:
try:
_ = os.path.exists(g_sPlantPath)
cls.m_pDB = await aiosqlite.connect(str(g_sPlantPath))
if g_bIsDebug:
cls.m_pDB = await aiosqlite.connect(str(g_sPlantPath.parent / "plant-test.db"))
else:
cls.m_pDB = await aiosqlite.connect(str(g_sPlantPath))
cls.m_pDB.row_factory = aiosqlite.Row
return True
except Exception as e: