Skip to content

Commit bb30ff1

Browse files
fix task
1 parent ee09142 commit bb30ff1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pioreactorui/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ def export_datasets() -> ResponseReturnValue:
12801280
status, msg = result(blocking=True, timeout=5 * 60)
12811281
except (HueyException, TaskException):
12821282
status = False
1283-
return {"result": status, "filename": None, "msg": "Timed out"}, 500
1283+
return {"result": status, "filename": None, "msg": "Task error, or time out"}, 500
12841284

12851285
if not status:
12861286
publish_to_error_log(msg, "export_datasets")

pioreactorui/tasks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,12 @@ def pio_plugins_list(*args: str, env: dict[str, str] = {}) -> tuple[bool, str]:
204204

205205
@huey.task()
206206
@huey.lock_task("export-data-lock")
207-
def pio_run_export_experiment_data(*args: str, env: dict[str, str] = {}) -> tuple[bool, bytes]:
207+
def pio_run_export_experiment_data(*args: str, env: dict[str, str] = {}) -> tuple[bool, str]:
208208
logger.info(f'Executing `{join(("pio", "run", "export_experiment_data") + args)}`, {env=}')
209209
result = run(
210210
(PIO_EXECUTABLE, "run", "export_experiment_data") + args,
211+
capture_output=True,
212+
text=True,
211213
env=dict(os.environ) | env,
212214
)
213215
return result.returncode == 0, result.stdout.strip()

0 commit comments

Comments
 (0)