feat: extend stall timeout and remove sample cap
This commit is contained in:
1 parent
27f9f4add8
commit
eb6ea70e19
9 files changed
+105
-45
No files matched your search
@@ -108,6 +108,10 @@ import {
|
||||
LMECHN1_MAX_RIGHT_PORT_COUNT,
|
||||
lmechn1RightPortCount,
|
||||
} from "./componentSymbols/mechanical";
|
||||
import {
|
||||
solverStallTimeoutMessage,
|
||||
solverStallTimeoutReached,
|
||||
} from "./simulationTimeout";
|
||||
import {
|
||||
CONTACT_AWARE_EDGE_TYPE,
|
||||
contactAwareEdgeTypes,
|
||||
@@ -559,7 +563,6 @@ const PALETTE_COLLAPSED_SECTIONS_KEY =
|
||||
const PALETTE_ICON_PREVIEW_DELAY_MS = 500;
|
||||
const CONSOLE_VIEWPORT_MARGIN = 8;
|
||||
const SIMULATION_STREAM_IDLE_TIMEOUT_MS = 30_000;
|
||||
const SIMULATION_SOLVER_STALL_TIMEOUT_MS = 60_000;
|
||||
const GRID_SIZE = CANVAS_GRID_SIZE;
|
||||
const MODELING_DEFAULT_EDGE_OPTIONS = {
|
||||
interactionWidth: 28,
|
||||
@@ -7401,7 +7404,7 @@ function FlowWorkbench() {
|
||||
appendConsoleEntry(
|
||||
"error",
|
||||
error.code === "SOLVER_STALLED"
|
||||
? "求解器连续 60 秒没有接受新积分步,正在终止任务并恢复部分结果"
|
||||
? solverStallTimeoutMessage("recovering")
|
||||
: "超过 30 秒未收到后端数据,正在终止任务并恢复部分结果",
|
||||
);
|
||||
try {
|
||||
@@ -10936,10 +10939,10 @@ async function streamSystemSimulation(
|
||||
if (event.event === "progress") {
|
||||
if (
|
||||
event.heartbeat === true &&
|
||||
Date.now() - lastSolverProgressAt >= SIMULATION_SOLVER_STALL_TIMEOUT_MS
|
||||
solverStallTimeoutReached(lastSolverProgressAt)
|
||||
) {
|
||||
throw new SimulationStreamError(
|
||||
"求解器连续 60 秒没有接受新的积分步,任务可能已经卡死",
|
||||
solverStallTimeoutMessage("detected"),
|
||||
[],
|
||||
undefined,
|
||||
"SOLVER_STALLED",
|
||||
|
||||
Reference in new issue
Block a user