fix(tasks): fix task cancellation process tree leak, emit cancelled events, and refine status badges styling

This commit is contained in:
duorameng
2026-06-29 22:34:08 +08:00
parent e5fc716b8f
commit b52af6c4fd
10 changed files with 132 additions and 73 deletions
+1
View File
@@ -100,6 +100,7 @@ func (m *SystemWSManager) SubscribeEvents(bus *eventbus.EventBus) {
constant.EventTaskTimeout,
constant.EventTaskRunning,
constant.EventTaskQueued,
constant.EventTaskCancelled,
}
for _, evt := range taskEvents {
@@ -304,6 +304,8 @@ func (h *ServerSchedulerHandler) OnTaskCompleted(req *executor.ExecutionRequest,
eventType = constant.EventTaskFailed
case constant.TaskStatusTimeout:
eventType = constant.EventTaskTimeout
case constant.TaskStatusCancelled:
eventType = constant.EventTaskCancelled
}
if eventType != "" {
eventbus.DefaultBus.Publish(eventbus.Event{