(batchId)
| 1271 | } |
| 1272 | |
| 1273 | function 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 | |
| 1288 | function startCurrentBatchPolling(batchId) { |
| 1289 | if (!batchId) return; |
no test coverage detected