fix: 0.1.4
All checks were successful
/ build ushare (push) Successful in 36s
/ clean (push) Successful in 0s

1. meta clean goroutine walk error
  2. clean interval to args(--clean)
This commit is contained in:
loveuer 2025-05-16 16:50:22 +08:00
parent 0a24393dcb
commit d41d516f19

View File

@ -135,6 +135,11 @@ func (m *meta) Start(ctx context.Context) {
// 清理一天前的文件
go func() {
if opt.Cfg.CleanInterval <= 0 {
log.Warn("meta.Clean: no clean interval set, plz clean manual!!!")
return
}
ticker := time.NewTicker(5 * time.Minute)
duration := time.Duration(opt.Cfg.CleanInterval) * time.Hour