Skip to content

Commit

Permalink
Reset cache between goss serve runs (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
aelsabbahy authored Dec 10, 2016
1 parent fc54b49 commit 9eaeeb2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func Serve(c *cli.Context) {
cache := cache.New(c.Duration("cache"), 30*time.Second)

health := healthHandler{
c: c,
gossConfig: getGossConfig(c),
sys: system.New(c),
outputer: getOutputer(c),
Expand Down Expand Up @@ -64,6 +65,7 @@ func (h healthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if found {
resp = tmp.(res)
} else {
h.sys = system.New(h.c)
log.Printf("%v: Stale cache, running tests", r.RemoteAddr)
iStartTime := time.Now()
out := validate(h.sys, h.gossConfig, h.maxConcurrent)
Expand Down

0 comments on commit 9eaeeb2

Please sign in to comment.