Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/hidex_rest_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import glob
import os
import time
from pathlib import Path
from typing import Optional

import clr
Expand All @@ -17,7 +18,9 @@
from madsci.node_module.rest_node_module import RestNode
from typing_extensions import Annotated

clr.AddReference("C:\\Users\\rpl\\\\source\\repos\\hidex_module\\src\\hidex_interface\\bin\\Debug\\HidexNode.dll")
library_path = Path(__file__).parent
dll_path = library_path / "hidex_interface/bin/Debug/HidexNode.dll"
clr.AddReference(str(dll_path))
# ruff: noqa: E402
import HidexNode as HN
import HidexNode.HidexAutomation as HA
Expand Down Expand Up @@ -152,6 +155,8 @@ def run_assay(
) # * means all if need specific format then *.csv
latest_file = max(list_of_files, key=os.path.getctime)
time.sleep(0.5)
while os.path.getsize(latest_file) == 0:
time.sleep(1)
return ActionSucceeded(files={"assay_result": latest_file})
else:
self.cancelled = False
Expand Down