chore(api): remove debug task list endpoint

This commit is contained in:
yusing
2025-04-13 05:56:25 +08:00
parent 0d859cc36f
commit 2b44ac5bcb
3 changed files with 1 additions and 15 deletions

View File

@@ -2,7 +2,6 @@ package task
import (
"context"
"encoding/json"
"errors"
"os"
"os/signal"
@@ -66,12 +65,7 @@ func GracefulShutdown(timeout time.Duration) (err error) {
case <-root.finished:
return
case <-after:
b, err := json.Marshal(DebugTaskList())
if err != nil {
logging.Warn().Err(err).Msg("failed to marshal tasks")
return context.DeadlineExceeded
}
logging.Warn().RawJSON("tasks", b).Msgf("Timeout waiting for these %d tasks to finish", allTasks.Size())
logging.Warn().Msgf("Timeout waiting for %d tasks to finish", allTasks.Size())
return context.DeadlineExceeded
}
}