实现定时通道过期清理

This commit is contained in:
2026-05-07 14:58:11 +08:00
parent 8fc1d30578
commit a0b0be2b8e
10 changed files with 112 additions and 32 deletions

View File

@@ -4,6 +4,7 @@ import (
"platform/pkg/env"
auth2 "platform/web/auth"
"platform/web/handlers"
s "platform/web/services"
"time"
q "platform/web/queries"
@@ -33,6 +34,12 @@ func ApplyRouters(app *fiber.App) {
}
return ctx.JSON(rs)
})
debug.Get("/channel/clear-expired", func(ctx *fiber.Ctx) error {
if err := s.Channel.ClearExpiredChannels(); err != nil {
return err
}
return ctx.SendStatus(fiber.StatusOK)
})
}
}