Skip to content

Commit

Permalink
why is this 1
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Dec 11, 2024
1 parent d24275f commit b73776c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 24.12.4
### 24.12.10
- Hotfix for UI settings bug


Expand Down
4 changes: 2 additions & 2 deletions pioreactorui/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,9 +1743,9 @@ def setup_worker_pioreactor() -> ResponseReturnValue:
status, msg = result(blocking=True, timeout=250)
except HueyException:
status, msg = False, "Timed out, see logs."

publish_to_log(status, "setup_worker_pioreactor")
if status:
return Response(status=200)
return {"msg": f"Worker {new_name} added successfully."}, 200
else:
publish_to_error_log(msg, "setup_worker_pioreactor")
return {"msg": msg}, 500
Expand Down
2 changes: 1 addition & 1 deletion pioreactorui/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ def pio_run(*args: str, env: dict[str, str] = {}) -> bool:

@huey.task()
def add_new_pioreactor(new_pioreactor_name: str, version: str, model: str) -> tuple[bool, str]:
# CPU heavy
logger.info(f"Adding new pioreactor {new_pioreactor_name}, {model} {version}")
result = run(
[PIO_EXECUTABLE, "workers", "add", new_pioreactor_name, "-v", version, "-m", model],
capture_output=True,
text=True,
)
cache.evict("config")
logger.info(result.returncode)
if result.returncode != 0:
return False, str(result.stderr.strip())
else:
Expand Down

0 comments on commit b73776c

Please sign in to comment.