1
0
forked from bot/app

🐛 修复生命周期钩子函数的问题

This commit is contained in:
2024-08-08 18:06:03 +08:00
parent c29a3fd6d4
commit f69feb1def
27 changed files with 172 additions and 148 deletions

View File

@ -1,7 +1,7 @@
import threading
from nonebot import logger
from liteyuki.core.spawn_process import chan_in_spawn
from liteyuki.core.spawn_process import chan_in_spawn_nb
def reload(delay: float = 0.0, receiver: str = "nonebot"):
@ -15,5 +15,5 @@ def reload(delay: float = 0.0, receiver: str = "nonebot"):
"""
chan_in_spawn.send(1, receiver)
chan_in_spawn_nb.send(1, receiver)
logger.info(f"Reloading LiteyukiBot({receiver})...")

View File

@ -6,10 +6,9 @@ import aiohttp
import nonebot
import psutil
import requests
from aiohttp import FormData
from .. import __VERSION_I__, __VERSION__, __NAME__
from .config import load_from_yaml
from .. import __NAME__, __VERSION_I__, __VERSION__
class LiteyukiAPI:
@ -69,6 +68,10 @@ class LiteyukiAPI:
else:
nonebot.logger.warning(f"Bug report is disabled: {content}")
def register(self):
pass
async def heartbeat_report(self):
"""
提交心跳,预留接口