MCPcopy Create free account
hub / github.com/astercloud/aster / cleanupRoutine

Method cleanupRoutine

pkg/tools/builtin/task_manager.go:510–520  ·  view source on GitHub ↗

cleanupRoutine 清理协程

()

Source from the content-addressed store, hash-verified

508
509// cleanupRoutine 清理协程
510func (tm *FileTaskManager) cleanupRoutine() {
511 for {
512 select {
513 case taskID := <-tm.cleanupChan:
514 _ = tm.CleanupTask(taskID)
515 case <-time.After(1 * time.Hour):
516 // 定期清理完成的任务
517 tm.cleanupCompletedTasks()
518 }
519 }
520}
521
522// cleanupCompletedTasks 清理完成的任务
523func (tm *FileTaskManager) cleanupCompletedTasks() {

Callers 1

NewFileTaskManagerFunction · 0.95

Calls 2

CleanupTaskMethod · 0.95
cleanupCompletedTasksMethod · 0.95

Tested by

no test coverage detected