(jobId)
| 245 | } |
| 246 | |
| 247 | async function probeJob(jobId) { |
| 248 | const r = await fetch(`/api/jobs/${jobId}`); |
| 249 | if (!r.ok) { |
| 250 | if (r.status === 404) throw new Error("Job no longer exists on the server"); |
| 251 | throw new Error(`Job probe failed: ${r.status}`); |
| 252 | } |
| 253 | const s = await r.json(); |
| 254 | applyState(s); |
| 255 | return s; |
| 256 | } |
| 257 | |
| 258 | function startJobPolling(jobId) { |
| 259 | stopJobPolling(); |
no test coverage detected