chore: delete not exist tasks

This commit is contained in:
Simon Ding
2024-07-30 22:11:41 +08:00
parent ebcc0c32da
commit eba646f5db

View File

@@ -39,6 +39,7 @@ func (s *Server) checkTasks() {
for id, t := range s.tasks {
if !t.Exists() {
log.Infof("task no longer exists: %v", id)
delete(s.tasks, id)
continue
}
log.Infof("task (%s) percentage done: %d%%", t.Name(), t.Progress())