From 0754a46405f67d8cf10bbe6104914cf1fda8690b Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 13 Sep 2023 21:13:24 -0300 Subject: [PATCH] do not update archives immediately. --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 370303a..81a5dd6 100644 --- a/main.go +++ b/main.go @@ -33,11 +33,13 @@ var ( ) func updateArchives(ctx context.Context) { + // do this so we don't run this every time we restart it locally + time.Sleep(10 * time.Minute) + for { select { - // Check for the cancellation signal. case <-ctx.Done(): - fmt.Println("Exit updateArchives gracefully...") + fmt.Println("exit updateArchives gracefully...") return default: loadNpubsArchive(ctx)