Skip to content

Commit

Permalink
feat: purge hole every 10 minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
JingYiJun committed Nov 2, 2023
1 parent fed69f8 commit 8337d32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis/hole/purge_hole.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8337d32

Please sign in to comment.