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

Function scheduleBatchWebSocketReconnect

static/js/app.js:1273–1286  ·  view source on GitHub ↗
(batchId)

Source from the content-addressed store, hash-verified

1271}
1272
1273function scheduleBatchWebSocketReconnect(batchId) {
1274 if (!batchId || batchWsReconnectTimer || batchWsManualClose || batchCompleted || batchFinalStatus !== null || activeBatchId !== batchId) {
1275 return;
1276 }
1277
1278 batchWsReconnectAttempts += 1;
1279 const delay = getReconnectDelay(batchWsReconnectAttempts);
1280 addLog('warning', `[系统] 批量任务 WebSocket 已断开,${delay / 1000} 秒后尝试重连监控...`);
1281
1282 batchWsReconnectTimer = setTimeout(() => {
1283 batchWsReconnectTimer = null;
1284 connectBatchWebSocket(batchId);
1285 }, delay);
1286}
1287
1288function startCurrentBatchPolling(batchId) {
1289 if (!batchId) return;

Callers 1

connectBatchWebSocketFunction · 0.85

Calls 3

getReconnectDelayFunction · 0.85
addLogFunction · 0.85
connectBatchWebSocketFunction · 0.85

Tested by

no test coverage detected