nit fast in more cases

This commit is contained in:
Ruben Fiszel
2025-07-19 00:06:26 +00:00
parent cd38174955
commit f62ff95b8a
+3 -1
View File
@@ -264,12 +264,14 @@
return typeof EventSource !== 'undefined'
}
let startedWatchingJob: number | undefined = undefined
export async function watchJob(testId: string, callbacks?: Callbacks) {
logOffset = 0
syncIteration = 0
errorIteration = 0
currentId = testId
job = undefined
startedWatchingJob = Date.now()
// Clean up any existing SSE connection
currentEventSource?.close()
@@ -504,7 +506,7 @@
params.set('only_result', 'true')
}
if (lastStartedAt > Date.now() - 5000) {
if (startedWatchingJob && startedWatchingJob > Date.now() - 5000) {
params.set('fast', 'true')
}