Skip to content

Commit caf9c41

Browse files
authored
fix: Stop sending before logs when after is specified (#2585)
This fixes duplicate logs appearing in completed jos!
1 parent 437066c commit caf9c41

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

coderd/provisionerjobs.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ func (api *API) provisionerJobLogs(rw http.ResponseWriter, r *http.Request, job
7272
}
7373
before = time.UnixMilli(beforeMS)
7474
} else {
75-
before = database.Now()
75+
// If we're following, we don't want logs before a timestamp!
76+
if !follow {
77+
before = database.Now()
78+
}
7679
}
7780

7881
if !follow {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy