From 8337d32e7332dba396936519811d291dba892611 Mon Sep 17 00:00:00 2001 From: Ke Chen Date: Thu, 2 Nov 2023 16:33:34 +0800 Subject: [PATCH] feat: purge hole every 10 minutes --- apis/hole/purge_hole.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apis/hole/purge_hole.go b/apis/hole/purge_hole.go index b1c0cad..c97da12 100644 --- a/apis/hole/purge_hole.go +++ b/apis/hole/purge_hole.go @@ -20,14 +20,14 @@ func purgeHole() error { } func PurgeHole(ctx context.Context) { - ticker := time.NewTicker(time.Hour * 24) + ticker := time.NewTicker(time.Minute * 10) defer ticker.Stop() for { select { case <-ticker.C: err := purgeHole() if err != nil { - log.Err(err).Msg("error purge message") + log.Err(err).Msg("error purge hole") } case <-ctx.Done(): return