fix: 钉钉通知仅在打包成功时发送

This commit is contained in:
shen 2026-06-08 20:43:21 +08:00
parent e18f33d60f
commit a0c857f3c2

View File

@ -335,11 +335,6 @@ async def run_build_task(task_id: str):
await log_streamer.emit(task_id, f"临时文件保留在: {build_dir}")
await asyncio.to_thread(log_streamer.save_log, task_id, build_dir)
# 钉钉通知
from .notification import notify_build_result
dingtalk = full_config.get("upload", {}).get("dingtalk", {})
await notify_build_result(task, dingtalk)
except asyncio.CancelledError:
await asyncio.to_thread(_db_update, db, task,
status="cancelled", completed_at=datetime.utcnow())
@ -372,11 +367,6 @@ async def run_build_task(task_id: str):
await log_streamer.emit(task_id, f"临时文件保留在: {build_dir}")
await asyncio.to_thread(log_streamer.save_log, task_id, build_dir)
# 钉钉通知
from .notification import notify_build_result
dingtalk = full_config.get("upload", {}).get("dingtalk", {})
await notify_build_result(task, dingtalk)
finally:
log_streamer.complete(task_id)