MCPcopy Index your code
hub / github.com/stemdeckapp/stemdeck / startJobPolling

Function startJobPolling

static/js/job.js:258–270  ·  view source on GitHub ↗
(jobId)

Source from the content-addressed store, hash-verified

256}
257
258function startJobPolling(jobId) {
259 stopJobPolling();
260 const tick = async () => {
261 try {
262 const s = await probeJob(jobId);
263 if (TERMINAL_STATUSES.has(s.status)) stopJobPolling();
264 } catch (err) {
265 console.warn("[job] REST fallback failed:", err);
266 }
267 };
268 tick();
269 jobPollTimerId = setInterval(tick, 1000);
270}
271
272// Connect (or reconnect) to the SSE stream for a job. On unexpected
273// disconnect we probe /api/jobs/{id} to decide: if the job is already

Callers 1

openFunction · 0.85

Calls 2

stopJobPollingFunction · 0.85
tickFunction · 0.70

Tested by

no test coverage detected