if key fetch fails, save the failure so we don't retry again too quickly
This commit is contained in:
parent
6c0870994c
commit
049a15612d
|
@ -1,5 +1,9 @@
|
||||||
changelog
|
changelog
|
||||||
|
|
||||||
|
=== next
|
||||||
|
|
||||||
|
+ Reduce retries talking to dumb servers.
|
||||||
|
|
||||||
=== 0.8.6 Sartorial Headpiece
|
=== 0.8.6 Sartorial Headpiece
|
||||||
|
|
||||||
++ Import command now supports the elephant in the room.
|
++ Import command now supports the elephant in the room.
|
||||||
|
|
4
fun.go
4
fun.go
|
@ -603,6 +603,8 @@ var zaggies = cache.New(cache.Options{Filler: func(keyname string) (*rsa.PublicK
|
||||||
j, err := GetJunk(keyname)
|
j, err := GetJunk(keyname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("error getting %s pubkey: %s", keyname, err)
|
log.Printf("error getting %s pubkey: %s", keyname, err)
|
||||||
|
when := time.Now().UTC().Format(dbtimeformat)
|
||||||
|
stmtSaveXonker.Exec(keyname, "failed", "pubkey", when)
|
||||||
return nil, true
|
return nil, true
|
||||||
}
|
}
|
||||||
allinjest(originate(keyname), j)
|
allinjest(originate(keyname), j)
|
||||||
|
@ -610,6 +612,8 @@ var zaggies = cache.New(cache.Options{Filler: func(keyname string) (*rsa.PublicK
|
||||||
err = row.Scan(&data)
|
err = row.Scan(&data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("key not found after ingesting")
|
log.Printf("key not found after ingesting")
|
||||||
|
when := time.Now().UTC().Format(dbtimeformat)
|
||||||
|
stmtSaveXonker.Exec(keyname, "failed", "pubkey", when)
|
||||||
return nil, true
|
return nil, true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue