mirror of
https://github.com/aljazceru/njump.git
synced 2026-02-23 06:54:20 +01:00
do not update archives immediately.
This commit is contained in:
6
main.go
6
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)
|
||||
|
||||
Reference in New Issue
Block a user