Proper skip on invalidlist, reduce check time
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f9e7332d2e
commit
7573e47b77
|
@ -170,7 +170,9 @@ func handle(ctx *httputils.RequestContext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if entry != nil {
|
if entry != nil {
|
||||||
for _, ci := range skip {
|
oldSkip := skip
|
||||||
|
skip = entry.InvalidList
|
||||||
|
for _, ci := range oldSkip {
|
||||||
if !entry.InInvalidList(ci) {
|
if !entry.InInvalidList(ci) {
|
||||||
skip = append(skip, ci)
|
skip = append(skip, ci)
|
||||||
}
|
}
|
||||||
|
@ -191,9 +193,6 @@ func handle(ctx *httputils.RequestContext) {
|
||||||
|
|
||||||
//TODO: only trigger this when we don't get a 404
|
//TODO: only trigger this when we don't get a 404
|
||||||
go func() {
|
go func() {
|
||||||
|
|
||||||
//e.CheckTime = time.Now().UTC().Unix() + 3600*24*365 //force a check next year as necessary
|
|
||||||
|
|
||||||
var newInvalidList []int
|
var newInvalidList []int
|
||||||
var e *content.Entry
|
var e *content.Entry
|
||||||
|
|
||||||
|
@ -258,7 +257,7 @@ func getContentEntry(key *content.HashIdentifier) *content.Entry {
|
||||||
go func() {
|
go func() {
|
||||||
b, _ := entry.Encode() //Encode/decode to copy object
|
b, _ := entry.Encode() //Encode/decode to copy object
|
||||||
e := content.DecodeEntry(entry.Key, b)
|
e := content.DecodeEntry(entry.Key, b)
|
||||||
e.CheckTime = time.Now().UTC().Unix() + 3600*24*365 //force a check next year as necessary
|
e.CheckTime = time.Now().UTC().Unix() + 3600*24*30 //force a check every 30 days as they get fetched
|
||||||
|
|
||||||
var newInvalidList []int
|
var newInvalidList []int
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue