fix: 钉钉通知仅在打包成功时发送
This commit is contained in:
parent
e18f33d60f
commit
a0c857f3c2
@ -335,11 +335,6 @@ async def run_build_task(task_id: str):
|
|||||||
await log_streamer.emit(task_id, f"临时文件保留在: {build_dir}")
|
await log_streamer.emit(task_id, f"临时文件保留在: {build_dir}")
|
||||||
await asyncio.to_thread(log_streamer.save_log, task_id, 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:
|
except asyncio.CancelledError:
|
||||||
await asyncio.to_thread(_db_update, db, task,
|
await asyncio.to_thread(_db_update, db, task,
|
||||||
status="cancelled", completed_at=datetime.utcnow())
|
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 log_streamer.emit(task_id, f"临时文件保留在: {build_dir}")
|
||||||
await asyncio.to_thread(log_streamer.save_log, task_id, 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:
|
finally:
|
||||||
log_streamer.complete(task_id)
|
log_streamer.complete(task_id)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user