You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces the environment variable MWI_PROCESS_START_TIMEOUT, to configure the default timeout of 120 seconds, used by matlab-proxy while waiting for the processes it launches (viz: Xvfb & MATLAB).
fixes#24
Eg:
```
# Set the timeout to 5 minutes (300 seconds)
env MWI_PROCESS_START_TIMEOUT=300 matlab-proxy-app
```
# In WINDOWS systems, errors are raised as UI windows and cannot be captured programmatically.
847
845
# So, raise a generic error wherever appropriate
848
-
generic_error=f"MATLAB did not start in {int(self.EMBEDDED_CONNECTOR_MAX_STARTUP_DURATION_IN_SECONDS)} seconds. Use Windows Remote Desktop to check for any errors."
846
+
generic_error=f"MATLAB did not start in {int(self.PROCESS_TIMEOUT)} seconds. Use Windows Remote Desktop to check for any errors."
849
847
logger.error(f":{this_task}: {generic_error}")
850
848
iflen(self.logs["matlab"]) ==0:
851
849
await__force_stop_matlab(user_visible_error)
852
850
# Breaking out of the loop to end this task as matlab-proxy was unable to launch MATLAB successfully
853
-
# even after waiting for EMBEDDED_CONNECTOR_MAX_STARTUP_DURATION_IN_SECONDS
851
+
# even after waiting for self.PROCESS_TIMEOUT
854
852
break
855
853
else:
856
854
# Do not stop the MATLAB process or break from the loop (the error type is unknown)
f"Using custom process startup timeout {custom_startup_timeout} seconds"
39
+
)
40
+
returnint(custom_startup_timeout)
41
+
42
+
else:
43
+
logger.warn(
44
+
f"The value set for {mwi_env.get_env_name_process_startup_timeout()}:{custom_startup_timeout} is not a number. Using {constants.DEFAULT_PROCESS_START_TIMEOUT} as the default value"
45
+
)
46
+
returnconstants.DEFAULT_PROCESS_START_TIMEOUT
47
+
48
+
logger.info(
49
+
f"Using {constants.DEFAULT_PROCESS_START_TIMEOUT} seconds as the default timeout value"
50
+
)
51
+
52
+
returnconstants.DEFAULT_PROCESS_START_TIMEOUT
53
+
54
+
26
55
defget_matlab_executable_and_root_path():
27
56
"""Returns the path from the MWI_CUSTOM_MATLAB_ROOT environment variable if valid, else returns
28
57
MATLAB root based on the matlab executable if found on the system path.
0 commit comments