update
This commit is contained in:
@@ -740,9 +740,10 @@ class ProvisionerBot:
|
||||
"""包装任务以处理完成通知"""
|
||||
try:
|
||||
result = await task
|
||||
success = sum(1 for r in (result or []) if r.get("status") == "completed")
|
||||
failed = len(result or []) - success
|
||||
await self.notifier.notify_task_completed(team_name, success, failed)
|
||||
# 收集成功和失败的账号
|
||||
success_accounts = [r.get("email") for r in (result or []) if r.get("status") == "success"]
|
||||
failed_accounts = [r.get("email") for r in (result or []) if r.get("status") != "success"]
|
||||
await self.notifier.notify_task_completed(team_name, success_accounts, failed_accounts)
|
||||
except Exception as e:
|
||||
await self.notifier.notify_error(f"任务失败: {team_name}", str(e))
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user