mirror of
https://github.com/bitvora/wot-relay.git
synced 2025-04-22 16:51:28 +00:00
increase timeout length
This commit is contained in:
parent
cc54cb5464
commit
b762c1c974
6
main.go
6
main.go
@ -219,7 +219,7 @@ func appendPubkey(pubkey string) {
|
||||
}
|
||||
|
||||
func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) {
|
||||
ticker := time.NewTicker(1 * time.Minute)
|
||||
ticker := time.NewTicker(10 * time.Minute)
|
||||
defer ticker.Stop()
|
||||
|
||||
archivePool = nostr.NewSimplePool(ctx)
|
||||
@ -229,7 +229,7 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) {
|
||||
trustNetworkCopy := make([]string, len(trustNetwork))
|
||||
copy(trustNetworkCopy, trustNetwork)
|
||||
mu.Unlock()
|
||||
ctxTimeout, cancel := context.WithTimeout(ctx, 1*time.Minute)
|
||||
ctxTimeout, cancel := context.WithTimeout(ctx, 9*time.Minute)
|
||||
// Create a new context with timeout for each iteration of the loop
|
||||
|
||||
filters := []nostr.Filter{{
|
||||
@ -264,6 +264,6 @@ func archiveTrustedNotes(relay *khatru.Relay, ctx context.Context) {
|
||||
}
|
||||
cancel()
|
||||
|
||||
fmt.Println("archiveTrustedNotes: finished one cycle, will restart in 1 minute")
|
||||
fmt.Println("archiveTrustedNotes: finished one cycle, will restart in 10 minutes")
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user