diff options
author | Sunil Shetye | 2025-05-23 12:05:30 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-05-23 12:06:43 +0530 |
commit | 67452d9995fbde957310931c6b850787ae06e6b8 (patch) | |
tree | 98dfc96e0bbed01836a01dfd8d79d297a19e3dd1 | |
parent | 10bd9e59639878a6f5bd7214b959aec9006a3682 (diff) | |
download | Common-Interface-Project-67452d9995fbde957310931c6b850787ae06e6b8.tar.gz Common-Interface-Project-67452d9995fbde957310931c6b850787ae06e6b8.tar.bz2 Common-Interface-Project-67452d9995fbde957310931c6b850787ae06e6b8.zip |
reduce first timeout
-rw-r--r-- | blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js index 0b57cf9d..5b1fc48e 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/SimulationScreen.js @@ -610,7 +610,7 @@ export default function SimulationScreen ({ open, close }) { }, [taskId, chartIdList]) // Get the simulation result with task_Id - const simulationResult = useCallback((url, streamingUrl) => { + const simulationResult = useCallback((url, streamingUrl, timeout) => { api .get(url) .then((res) => { @@ -619,7 +619,7 @@ export default function SimulationScreen ({ open, close }) { case 'STARTED': case 'RETRY': setIsResult(false) - timeoutRef.current = setTimeout(() => simulationResult(url, streamingUrl), 10000) + timeoutRef.current = setTimeout(() => simulationResult(url, streamingUrl, 10000), timeout) break case 'STREAMING': @@ -670,7 +670,7 @@ export default function SimulationScreen ({ open, close }) { const getUrl = 'simulation/status/' + taskId const getStreamingUrl = 'simulation/streaming/' + taskId - simulationResult(getUrl, getStreamingUrl) + simulationResult(getUrl, getStreamingUrl, 2000) }, [isResult, simulationResult]) useEffect(() => getSimulationResult(taskId), [taskId, getSimulationResult]) |