From 2304015aac01afbbb247ca46bda41dfa8fdeafb0 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Mon, 12 Jul 2021 15:59:27 -0400 Subject: [PATCH] only delete accounts that haven't updated expiry in over 2 hours --- cmd/apollo-scheduler/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/apollo-scheduler/main.go b/cmd/apollo-scheduler/main.go index 47141de..9b77ef9 100644 --- a/cmd/apollo-scheduler/main.go +++ b/cmd/apollo-scheduler/main.go @@ -152,7 +152,7 @@ func evalScript(ctx context.Context, redisConn *redis.Client) (string, error) { } func cleanAccounts(ctx context.Context, logger *logrus.Logger, pool *pgxpool.Pool) { - now := time.Now().Unix() + now := time.Now().Unix() - 7200 count := 0 ids := []int64{}