feat(core): 定时任务薄封装 scheduler / 跨插件任务槽 task_slots / 出站媒体显式发送方式
- scheduler.py:apscheduler 薄封装(统一 Asia/Shanghai、misfire_grace_time、起止/异常日志) - task_slots.py:长任务任务槽(进度上报 / 同槽去重 / SSE 推送 / 取消), video_analysis temp 清理等长任务接入 - outbound_media:新增 HEXI_MEDIA_MODE 显式发送方式(http/base64/file,/hub 可改), 修复 alconna 对 base64 载荷补 https:// 前缀导致的 fetch failed(repair_mangled_url) - learning_chat 定时任务迁入 hexi.core.scheduler - 测试:新增 test_scheduler / test_task_slots,扩充 test_outbound_media Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
a789a44f5d
commit
0ac1958932
8 files changed
+1353
-12
No files matched your search
@@ -20,7 +20,7 @@ from nonebot.typing import T_State
|
||||
|
||||
require("nonebot_plugin_orm")
|
||||
require("nonebot_plugin_apscheduler")
|
||||
from nonebot_plugin_apscheduler import scheduler
|
||||
from hexi.core.scheduler import scheduled_job
|
||||
|
||||
from nonebot_plugin_orm import get_session
|
||||
|
||||
@@ -77,7 +77,7 @@ async def _(event: GroupMessageEvent, answers=Arg("answers")):
|
||||
)
|
||||
|
||||
|
||||
@scheduler.scheduled_job("interval", minutes=3, misfire_grace_time=5)
|
||||
@scheduled_job("interval", minutes=3, misfire_grace_time=5)
|
||||
async def speak_up():
|
||||
if not config_manager.config.total_enable:
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user