mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
fix: Stop sending before logs when after is specified (#2585)
This fixes duplicate logs appearing in completed jos!
This commit is contained in:
@ -72,8 +72,11 @@ func (api *API) provisionerJobLogs(rw http.ResponseWriter, r *http.Request, job
|
||||
}
|
||||
before = time.UnixMilli(beforeMS)
|
||||
} else {
|
||||
// If we're following, we don't want logs before a timestamp!
|
||||
if !follow {
|
||||
before = database.Now()
|
||||
}
|
||||
}
|
||||
|
||||
if !follow {
|
||||
logs, err := api.Database.GetProvisionerLogsByIDBetween(r.Context(), database.GetProvisionerLogsByIDBetweenParams{
|
||||
|
Reference in New Issue
Block a user