hit refresh for all sites, local

This commit is contained in:
Umputun
2018-02-13 11:55:47 -06:00
parent 99b98bfee4
commit cf39287b48
+7 -5
View File
@@ -107,12 +107,14 @@ func main() {
srv.Cache = common.NewLoadingCache(4*time.Hour, 15*time.Minute, func() {
// set post-flush callback
resp, err := http.Get(opts.RemarkURL + "/api/v1/list")
if err != nil {
log.Printf("[WARN] failed to refresh cached list, %s", err)
return
for _, site := range opts.Sites {
resp, err := http.Get("http://localhost:8080/api/v1/list?" + site)
if err != nil {
log.Printf("[WARN] failed to refresh cached list for %s, %s", site, err)
return
}
resp.Body.Close()
}
resp.Body.Close()
})
if opts.DevMode {