This commit is contained in:
matst80
2024-11-09 13:15:48 +01:00
parent ec91990ea0
commit c87f4a01ab

View File

@@ -83,9 +83,9 @@ func NewSyncedPool(local *GrainLocalPool, hostname string, d Discovery) (*Synced
remoteIndex: make(map[CartId]*RemoteGrainPool), remoteIndex: make(map[CartId]*RemoteGrainPool),
} }
if d != nil { if d != nil {
cartPurge := time.NewTicker(time.Minute) discoveryTimer := time.NewTicker(time.Second * 5)
go func() { go func() {
<-cartPurge.C <-discoveryTimer.C
hosts, err := d.Discover() hosts, err := d.Discover()
if err != nil { if err != nil {
log.Printf("Error discovering hosts: %v\n", err) log.Printf("Error discovering hosts: %v\n", err)