From 17bb6539390f7aa7c15ba020eb6bfbb3340092ff Mon Sep 17 00:00:00 2001 From: noe Date: Wed, 13 Nov 2024 20:55:09 -0800 Subject: [PATCH] pruner: loop every 5 mins --- cmd/pruner/pruner.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/pruner/pruner.go b/cmd/pruner/pruner.go index 9655c95..42b8105 100644 --- a/cmd/pruner/pruner.go +++ b/cmd/pruner/pruner.go @@ -23,7 +23,10 @@ func main() { ctx, cancel := context.WithTimeout(context.Background(), time.Second*30) defer cancel() - run(ctx, playerStore, vehicleStore) + for { + run(ctx, playerStore, vehicleStore) + time.Sleep(5 * time.Minute) + } } func run(ctx context.Context, ps store.IPlayerStore, vs store.IVehicleStore) {