fix: Stop sending before logs when after is specified (#2585)

This fixes duplicate logs appearing in completed jos!
This commit is contained in:
Kyle Carberry
2022-06-22 12:09:28 -05:00
committed by GitHub
parent 437066ce20
commit caf9c41a9e

View File

@ -72,7 +72,10 @@ func (api *API) provisionerJobLogs(rw http.ResponseWriter, r *http.Request, job
}
before = time.UnixMilli(beforeMS)
} else {
before = database.Now()
// If we're following, we don't want logs before a timestamp!
if !follow {
before = database.Now()
}
}
if !follow {