funcnodes-react-flow 0.1.15__tar.gz → 0.2.0__tar.gz
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.
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/PKG-INFO +1 -1
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/__main__.py +0 -4
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/run.py +23 -22
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/pyproject.toml +5 -1
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/LICENSE +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/README.md +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/__init__.py +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/android-chrome-192x192.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/android-chrome-512x512.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/apple-touch-icon.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/asset-manifest.json +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/css/style.css +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/favicon-16x16.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/favicon-32x32.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/favicon.ico +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/index.html +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/js/830.js +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/js/830.js.LICENSE.txt +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/js/main.js +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/js/main.js.LICENSE.txt +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/logo.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/logo192.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/logo512.png +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/manifest.json +0 -0
- {funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/robots.txt +0 -0
@@ -29,20 +29,22 @@ class CustomHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
|
|
29
29
|
|
30
30
|
def get_worker_manager(self):
|
31
31
|
# Implement custom GET handling logic here
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
if self.server.start_worker_manager:
|
33
|
+
asyncio.run(
|
34
|
+
fn.worker.worker_manager.assert_worker_manager_running(
|
35
|
+
host=self.server.worker_manager_host,
|
36
|
+
port=self.server.worker_manager_port,
|
37
|
+
ssl=self.server.worker_manager_ssl,
|
38
|
+
)
|
37
39
|
)
|
38
|
-
)
|
39
40
|
self.send_response(200)
|
40
41
|
self.send_header("Content-type", "text/json")
|
41
42
|
self.end_headers()
|
42
43
|
self.wfile.write(
|
43
|
-
|
44
|
-
"
|
45
|
-
|
44
|
+
(
|
45
|
+
f"ws{'s' if self.server.worker_manager_ssl else ''}://"
|
46
|
+
f"{self.server.worker_manager_host}:{self.server.worker_manager_port}"
|
47
|
+
).encode("utf-8")
|
46
48
|
)
|
47
49
|
|
48
50
|
def handle_custom_post(self):
|
@@ -69,6 +71,7 @@ class GracefulHTTPServer(socketserver.TCPServer):
|
|
69
71
|
worker_manager_host: Optional[str] = None,
|
70
72
|
worker_manager_port: Optional[int] = None,
|
71
73
|
worker_manager_ssl: Optional[bool] = None,
|
74
|
+
start_worker_manager=True,
|
72
75
|
):
|
73
76
|
if worker_manager_host is None:
|
74
77
|
worker_manager_host = fn.config.CONFIG["worker_manager"]["host"]
|
@@ -79,13 +82,14 @@ class GracefulHTTPServer(socketserver.TCPServer):
|
|
79
82
|
if worker_manager_ssl is None:
|
80
83
|
worker_manager_ssl = fn.config.CONFIG["worker_manager"].get("ssl", False)
|
81
84
|
|
85
|
+
self.start_worker_manager = start_worker_manager
|
82
86
|
self.worker_manager_ssl = worker_manager_ssl
|
83
87
|
self.worker_manager_host = worker_manager_host
|
84
88
|
self.worker_manager_port = worker_manager_port
|
85
89
|
super().__init__(server_address, RequestHandlerClass, bind_and_activate)
|
86
90
|
self._is_serving = True
|
87
91
|
|
88
|
-
def serve_forever(self
|
92
|
+
def serve_forever(self):
|
89
93
|
while self._is_serving:
|
90
94
|
self.handle_request()
|
91
95
|
|
@@ -117,16 +121,16 @@ def run_server(
|
|
117
121
|
worker_manager_host: Optional[str] = None,
|
118
122
|
worker_manager_port: Optional[int] = None,
|
119
123
|
worker_manager_ssl: Optional[bool] = None,
|
124
|
+
start_worker_manager=True,
|
120
125
|
):
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
126
|
+
if start_worker_manager:
|
127
|
+
asyncio.run(
|
128
|
+
fn.worker.worker_manager.assert_worker_manager_running(
|
129
|
+
host=worker_manager_host,
|
130
|
+
port=worker_manager_port,
|
131
|
+
ssl=worker_manager_ssl,
|
132
|
+
)
|
128
133
|
)
|
129
|
-
)
|
130
134
|
try:
|
131
135
|
script_directory = os.path.dirname(os.path.abspath(__file__))
|
132
136
|
os.chdir(script_directory)
|
@@ -136,6 +140,7 @@ def run_server(
|
|
136
140
|
worker_manager_host=worker_manager_host,
|
137
141
|
worker_manager_port=worker_manager_port,
|
138
142
|
worker_manager_ssl=worker_manager_ssl,
|
143
|
+
start_worker_manager=start_worker_manager,
|
139
144
|
)
|
140
145
|
print(f"Serving at port {port}")
|
141
146
|
if open_browser:
|
@@ -150,7 +155,3 @@ def run_server(
|
|
150
155
|
raise
|
151
156
|
except OSError as e:
|
152
157
|
print(f"Could not start server at port {port}: {e}")
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "funcnodes-react-flow"
|
3
|
-
version = "0.
|
3
|
+
version = "0.2.0"
|
4
4
|
description = "funcnodes frontend for react flow"
|
5
5
|
authors = ["Julian Kimmig <julian.kimmig@linkdlab.de>"]
|
6
6
|
readme = "README.md"
|
@@ -26,5 +26,9 @@ pre-commit = "*"
|
|
26
26
|
requires = ["poetry-core"]
|
27
27
|
build-backend = "poetry.core.masonry.api"
|
28
28
|
|
29
|
+
[tool.vulture]
|
30
|
+
min_confidence = 80
|
31
|
+
paths = ["funcnodes_react_flow"]
|
32
|
+
|
29
33
|
[tool.poetry.scripts]
|
30
34
|
funcnodes_react_flow = 'funcnodes_react_flow.__main__:main'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/apple-touch-icon.png
RENAMED
File without changes
|
{funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/asset-manifest.json
RENAMED
File without changes
|
{funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/css/style.css
RENAMED
File without changes
|
{funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/favicon-16x16.png
RENAMED
File without changes
|
{funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/favicon-32x32.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{funcnodes_react_flow-0.1.15 → funcnodes_react_flow-0.2.0}/funcnodes_react_flow/manifest.json
RENAMED
File without changes
|
File without changes
|