MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / startPolling

Function startPolling

static/js/selfcheck.js:529–544  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

527}
528
529function startPolling() {
530 if (selfcheckState.pollTimer) {
531 clearInterval(selfcheckState.pollTimer);
532 }
533 selfcheckState.pollTimer = setInterval(async () => {
534 try {
535 await loadScheduleAndRuntime();
536 const running = selfcheckState.runs.some((run) => ['running', 'pending'].includes(String(run.status || '').toLowerCase()));
537 if (running) {
538 await loadRuns();
539 }
540 } catch (error) {
541 // 轮询静默失败,不打断页面交互
542 }
543 }, 5000);
544}
545
546async function initSelfcheckPage() {
547 bindEvents();

Callers 1

initSelfcheckPageFunction · 0.85

Calls 2

loadScheduleAndRuntimeFunction · 0.85
loadRunsFunction · 0.85

Tested by

no test coverage detected