Flowfile 0.3.1__py3-none-any.whl → 0.3.1.2__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.
flowfile/api.py CHANGED
@@ -9,6 +9,7 @@ import atexit
9
9
  import logging
10
10
  import webbrowser
11
11
  import shutil
12
+
12
13
  from pathlib import Path
13
14
  from typing import Optional, Dict, Any, Union, Tuple, List
14
15
  from subprocess import Popen
@@ -162,7 +163,6 @@ def start_flowfile_server_process(module_name: str = DEFAULT_MODULE_NAME) -> Tup
162
163
  if is_flowfile_running():
163
164
  return True, check_if_in_single_mode()
164
165
 
165
-
166
166
  if _server_process and _server_process.poll() is None:
167
167
  logger.warning("Server process object exists but API not responding. Attempting to restart.")
168
168
  stop_flowfile_server_process()
@@ -182,12 +182,15 @@ def start_flowfile_server_process(module_name: str = DEFAULT_MODULE_NAME) -> Tup
182
182
  atexit.register(stop_flowfile_server_process)
183
183
 
184
184
  logger.info("Waiting for server to initialize...")
185
-
186
- for i in range(10):
187
- time.sleep(1)
185
+ print("Starting the ui service")
186
+ for i in range(20):
188
187
  if is_flowfile_running():
188
+ print("Flowfile UI started.")
189
189
  logger.info("Server started successfully.")
190
190
  return True, check_if_in_single_mode()
191
+ if i % 5 == 0 and i > 0:
192
+ print("Waiting for Flowfile UI to start.")
193
+ time.sleep(1)
191
194
  else:
192
195
  logger.error("Failed to start server: API did not become responsive.")
193
196
  if _server_process and _server_process.stderr:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: Flowfile
3
- Version: 0.3.1
3
+ Version: 0.3.1.2
4
4
  Summary: Project combining flowfile core (backend) and flowfile_worker (compute offloader) and flowfile_frame (api)
5
5
  Author: Edward van Eechoud
6
6
  Author-email: evaneechoud@gmail.com
@@ -3,7 +3,7 @@ build_backends/main.py,sha256=hLmfqTeHLSTiwwZ5mUuoLQgtO40Igvl1_4NbnvzWSgI,9912
3
3
  build_backends/main_prd.py,sha256=JR2tYCMWM5ThooQjv5pw6nwVKMQjgsiHgKMhYn9NXWI,6927
4
4
  flowfile/__init__.py,sha256=B1vnUboOki3pP3BAmoQ0j62nEiB51X9kc9N8Qu7bgcg,2419
5
5
  flowfile/__main__.py,sha256=hAMeyORHhLnw1lIXe6-EYDwgUi2odW0Rb4eDkcNtBiM,2612
6
- flowfile/api.py,sha256=C7bJTABkyX5au0cvOvGduYmKBrhiIos20XA5hK6kPIo,14981
6
+ flowfile/api.py,sha256=hnTA4zSzaX9mail_rIMdVkdcbfvMyJM3EPrkACiUo1I,15163
7
7
  flowfile/readme.md,sha256=n93Cpp9DPIBfe2jxKcUVokl5PTobxnE1mWHfRD018xE,4137
8
8
  flowfile/web/__init__.py,sha256=bViGSO1AmLSjCM4nnQVFaYUTFHYKj0XK4VjscGwZGTs,5462
9
9
  flowfile/web/static/assets/AirbyteReader-1ac35765.css,sha256=GsNXZRBzBqcgSHWYHFfpQjYnQ1G90hCaWgThLCG80jI,6260
@@ -231,7 +231,7 @@ flowfile_core/routes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
231
231
  flowfile_core/routes/auth.py,sha256=-2SWMCDDKYSnriiYH3hOadnsHdmVckcIV_vA2mZfBu0,1251
232
232
  flowfile_core/routes/logs.py,sha256=LHGbCN10pjS8yAWHaG9eUHxMoGQlHjVWFSxtAnuQjrM,5868
233
233
  flowfile_core/routes/public.py,sha256=bRmRyphaCLTTdPjPn_M6NWPUEQKHB5eeKlKoOs7jWzA,217
234
- flowfile_core/routes/routes.py,sha256=RkgajFkwnBkpbRpUks7Dgt2QGJJia23bX39QrybB5Fw,23094
234
+ flowfile_core/routes/routes.py,sha256=-pJ8LQxX6_-EnkXGu3C-K3UcQI1ZUPNJ0X8REbpvcCI,23181
235
235
  flowfile_core/routes/secrets.py,sha256=QIrloBSclw9JGcpB-c4VHlNBVy2t-sAAB9RXK9ibNlk,3061
236
236
  flowfile_core/run_lock.py,sha256=1bINUPwZe7v9rHRePTk0CaExscqf2pvk4hWoYFZWQqE,296
237
237
  flowfile_core/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -297,8 +297,8 @@ test_utils/__init__.py,sha256=8WwOgIuKw6YtOc1GWR1DqIhQ8BhlLWqsMyQJSpxnzKk,66
297
297
  test_utils/postgres/__init__.py,sha256=y3V_6a9N1Pvm5NIBaA8CFf3i4mvPVY-H1teHA-rg0VU,33
298
298
  test_utils/postgres/commands.py,sha256=4oA8EHW3EqwGkG02HSqEGbXEBGM01sUW5FsyHm86W4k,4347
299
299
  test_utils/postgres/fixtures.py,sha256=kR8UBjQr3pgbe-xM-V8x8VseTHCPv0EmDEzPHl5Qc8Y,13507
300
- flowfile-0.3.1.dist-info/LICENSE,sha256=pCfLAA27jMHReYk_wGiirZxWRRXz_Bm7PVInRCa9P5g,1075
301
- flowfile-0.3.1.dist-info/METADATA,sha256=7SN0LiVjwzpMWk7st7VTyEXob_3NGXhoOSttL-m7YSI,8004
302
- flowfile-0.3.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
303
- flowfile-0.3.1.dist-info/entry_points.txt,sha256=Q3CEYNk33UaWlA9D-8yXYH0FwjKBsrtNuzzzHxhwnNI,333
304
- flowfile-0.3.1.dist-info/RECORD,,
300
+ flowfile-0.3.1.2.dist-info/LICENSE,sha256=pCfLAA27jMHReYk_wGiirZxWRRXz_Bm7PVInRCa9P5g,1075
301
+ flowfile-0.3.1.2.dist-info/METADATA,sha256=weAUWv0mji3R8G1K3k_jjtiBhvXN852bNlaaxwkCW60,8006
302
+ flowfile-0.3.1.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
303
+ flowfile-0.3.1.2.dist-info/entry_points.txt,sha256=Q3CEYNk33UaWlA9D-8yXYH0FwjKBsrtNuzzzHxhwnNI,333
304
+ flowfile-0.3.1.2.dist-info/RECORD,,
@@ -1,3 +1,4 @@
1
+ import asyncio
1
2
  import inspect
2
3
  import logging
3
4
  import os
@@ -570,9 +571,10 @@ def get_graphic_walker_input(flow_id: int, node_id: int):
570
571
  async def get_instant_function_result(flow_id: int, node_id: int, func_string: str):
571
572
  try:
572
573
  node = flow_file_handler.get_node(flow_id, node_id)
574
+ result = await asyncio.to_thread(get_instant_func_results, node, func_string)
575
+ return result
573
576
  except Exception as e:
574
- raise HTTPException(404, str(e))
575
- return get_instant_func_results(node, func_string)
577
+ raise HTTPException(status_code=500, detail=str(e))
576
578
 
577
579
 
578
580
  @router.get('/api/get_xlsx_sheet_names', tags=['excel_reader'], response_model=List[str])