chore(lua): 删除调度器里两个无人调用的诊断辅助函数

sortedTaskNames / PluginTasks 是开发 Phase 4 时留下的诊断辅助,最终
没有任何调用点(WebUI 走 /api/plugins 的既有结构)。连同不再需要的
sort import 一并删除,保持包面干净。
This commit is contained in:
JianFeeeee
2026-10-11 11:41:08 +08:00
parent 24e00cdc50
commit b6148e6f79

View File

@ -33,7 +33,6 @@ package lua
import (
"fmt"
"sort"
"sync"
"sync/atomic"
"time"
@ -638,23 +637,3 @@ func readNumberInt(L *golua.State, idx int, field string) int {
}
return int(L.ToNumber(-1))
}
// sortedTaskNames returns the task function names of a spec (for diagnostics).
func (s scheduleSpec) sortedTaskNames() []string {
out := make([]string, 0, len(s.tasks))
for _, t := range s.tasks {
out = append(out, t.Fn)
}
sort.Strings(out)
return out
}
// PluginTasks lists the scheduled task names a plugin declared (for diagnostics
// and for the WebUI to show what periodic work exists).
func (p *Plugin) PluginTasks() []string {
out := make([]string, 0, len(p.Schedule))
for _, t := range p.Schedule {
out = append(out, t.Fn)
}
return out
}