实现定时通道过期清理

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

@@ -9,3 +9,9 @@ const RemoveChannel = "channel:remove"
func NewRemoveChannel(batch string) *asynq.Task {
return asynq.NewTask(RemoveChannel, []byte(batch))
}
const ClearExpiredChannels = "channel:clear_expired"
func NewClearExpiredChannels() *asynq.Task {
return asynq.NewTask(ClearExpiredChannels, nil)
}