matlab-proxy 0.19.0__py3-none-any.whl → 0.20.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of matlab-proxy might be problematic. Click here for more details.
- matlab_proxy/app.py +22 -15
- matlab_proxy/gui/asset-manifest.json +3 -3
- matlab_proxy/gui/index.html +1 -1
- matlab_proxy/gui/static/js/{main.e07799e7.js → main.9c68c75c.js} +3 -3
- matlab_proxy/gui/static/js/main.9c68c75c.js.map +1 -0
- matlab_proxy/util/mwi/logger.py +22 -2
- matlab_proxy/util/windows.py +4 -1
- {matlab_proxy-0.19.0.dist-info → matlab_proxy-0.20.0.dist-info}/METADATA +15 -15
- {matlab_proxy-0.19.0.dist-info → matlab_proxy-0.20.0.dist-info}/RECORD +15 -15
- {matlab_proxy-0.19.0.dist-info → matlab_proxy-0.20.0.dist-info}/WHEEL +1 -1
- tests/unit/util/mwi/test_logger.py +38 -4
- matlab_proxy/gui/static/js/main.e07799e7.js.map +0 -1
- /matlab_proxy/gui/static/js/{main.e07799e7.js.LICENSE.txt → main.9c68c75c.js.LICENSE.txt} +0 -0
- {matlab_proxy-0.19.0.dist-info → matlab_proxy-0.20.0.dist-info}/LICENSE.md +0 -0
- {matlab_proxy-0.19.0.dist-info → matlab_proxy-0.20.0.dist-info}/entry_points.txt +0 -0
- {matlab_proxy-0.19.0.dist-info → matlab_proxy-0.20.0.dist-info}/top_level.txt +0 -0
matlab_proxy/app.py
CHANGED
|
@@ -443,7 +443,7 @@ async def shutdown_integration_delete(req):
|
|
|
443
443
|
loop = util.get_event_loop()
|
|
444
444
|
# Run the current batch of coroutines in the event loop and then exit.
|
|
445
445
|
# This completes the loop.run_forever() blocking call and subsequent code
|
|
446
|
-
# in
|
|
446
|
+
# in create_and_start_app() resumes execution.
|
|
447
447
|
loop.stop()
|
|
448
448
|
|
|
449
449
|
return res
|
|
@@ -807,8 +807,8 @@ async def cleanup_background_tasks(app):
|
|
|
807
807
|
await state.stop_matlab(force_quit=True)
|
|
808
808
|
|
|
809
809
|
# Cleanup server tasks
|
|
810
|
-
|
|
811
|
-
await util.cancel_tasks(
|
|
810
|
+
server_tasks = state.server_tasks
|
|
811
|
+
await util.cancel_tasks(server_tasks)
|
|
812
812
|
|
|
813
813
|
|
|
814
814
|
def configure_and_start(app):
|
|
@@ -936,6 +936,11 @@ def configure_no_proxy_in_env():
|
|
|
936
936
|
|
|
937
937
|
|
|
938
938
|
def create_and_start_app(config_name):
|
|
939
|
+
"""Creates and start the web server. Will block until the server is interrupted or is shut down
|
|
940
|
+
|
|
941
|
+
Args:
|
|
942
|
+
config_name (str): Name of the configuration to use with matlab-proxy.
|
|
943
|
+
"""
|
|
939
944
|
configure_no_proxy_in_env()
|
|
940
945
|
|
|
941
946
|
# Create, configure and start the app.
|
|
@@ -947,23 +952,25 @@ def create_and_start_app(config_name):
|
|
|
947
952
|
# Add signal handlers for the current python process
|
|
948
953
|
loop = util.add_signal_handlers(loop)
|
|
949
954
|
try:
|
|
955
|
+
# Further execution is stopped here until an interrupt is raised
|
|
950
956
|
loop.run_forever()
|
|
957
|
+
|
|
951
958
|
except SystemExit:
|
|
952
959
|
pass
|
|
953
960
|
|
|
954
|
-
|
|
955
|
-
"""Shuts down the app in the event of a signal interrupt."""
|
|
956
|
-
logger.info("Shutting down MATLAB proxy-app")
|
|
957
|
-
|
|
958
|
-
await app.shutdown()
|
|
959
|
-
await app.cleanup()
|
|
960
|
-
|
|
961
|
-
# Shutdown any running tasks.
|
|
962
|
-
await util.cancel_tasks(asyncio.all_tasks())
|
|
963
|
-
|
|
961
|
+
# After handling the interrupt, proceed with shutting down the server gracefully.
|
|
964
962
|
try:
|
|
965
|
-
|
|
966
|
-
|
|
963
|
+
running_tasks = asyncio.all_tasks(loop)
|
|
964
|
+
loop.run_until_complete(
|
|
965
|
+
asyncio.gather(
|
|
966
|
+
app.shutdown(),
|
|
967
|
+
app.cleanup(),
|
|
968
|
+
util.cancel_tasks(running_tasks),
|
|
969
|
+
return_exceptions=False,
|
|
970
|
+
)
|
|
971
|
+
)
|
|
972
|
+
|
|
973
|
+
except Exception:
|
|
967
974
|
pass
|
|
968
975
|
|
|
969
976
|
logger.info("Finished shutting down. Thank you for using the MATLAB proxy.")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.da9c4eb8.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.9c68c75c.js",
|
|
5
5
|
"static/media/mathworks-pictograms.svg?20181009": "./static/media/mathworks-pictograms.f6f087b008b5a9435f26.svg",
|
|
6
6
|
"static/media/MATLAB-env-blur.png": "./static/media/MATLAB-env-blur.4fc94edbc82d3184e5cb.png",
|
|
7
7
|
"static/media/mathworks.svg?20181004": "./static/media/mathworks.80a3218e1ba29f0573fb.svg",
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"static/media/gripper.svg": "./static/media/gripper.9defbc5e76d0de8bb6e0.svg",
|
|
36
36
|
"static/media/arrow.svg": "./static/media/arrow.0c2968b90bd9a64c8c3f.svg",
|
|
37
37
|
"main.da9c4eb8.css.map": "./static/css/main.da9c4eb8.css.map",
|
|
38
|
-
"main.
|
|
38
|
+
"main.9c68c75c.js.map": "./static/js/main.9c68c75c.js.map"
|
|
39
39
|
},
|
|
40
40
|
"entrypoints": [
|
|
41
41
|
"static/css/main.da9c4eb8.css",
|
|
42
|
-
"static/js/main.
|
|
42
|
+
"static/js/main.9c68c75c.js"
|
|
43
43
|
]
|
|
44
44
|
}
|
matlab_proxy/gui/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MATLAB"/><meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER"/><link rel="manifest" href="./manifest.json"/><title>MATLAB</title><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="./favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MATLAB"/><meta name="internal_mw_identifier" content="MWI_MATLAB_PROXY_IDENTIFIER"/><link rel="manifest" href="./manifest.json"/><title>MATLAB</title><script defer="defer" src="./static/js/main.9c68c75c.js"></script><link href="./static/css/main.da9c4eb8.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|