dayhoff-tools 1.9.2__py3-none-any.whl → 1.9.4__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.
- dayhoff_tools/cli/engine_commands.py +27 -21
- {dayhoff_tools-1.9.2.dist-info → dayhoff_tools-1.9.4.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.9.2.dist-info → dayhoff_tools-1.9.4.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.9.2.dist-info → dayhoff_tools-1.9.4.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.9.2.dist-info → dayhoff_tools-1.9.4.dist-info}/entry_points.txt +0 -0
@@ -773,23 +773,22 @@ def engine_status(
|
|
773
773
|
run_disp = engine["state"].capitalize()
|
774
774
|
|
775
775
|
# Compose Active/Idle header with extra detail when idle
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
# show Idle <elapsed>/<threshold> if available; else just N/A for stopped states
|
776
|
+
def _compute_active_disp(idle_info: Dict[str, Any]) -> str:
|
777
|
+
if idle_info.get("status") == "active":
|
778
|
+
return "[green]Active[/green]"
|
780
779
|
if running_state in ("stopped", "stopping"):
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
780
|
+
return "[dim]N/A[/dim]"
|
781
|
+
idle_seconds_v = idle_info.get("idle_seconds")
|
782
|
+
thresh_v = idle_info.get("idle_threshold")
|
783
|
+
if isinstance(idle_seconds_v, (int, float)) and isinstance(
|
784
|
+
thresh_v, (int, float)
|
785
|
+
):
|
786
|
+
return (
|
787
|
+
f"[yellow]Idle {int(idle_seconds_v)//60}m/{int(thresh_v)//60}m[/yellow]"
|
788
|
+
)
|
789
|
+
return "[yellow]Idle[/yellow]"
|
790
|
+
|
791
|
+
active_disp = _compute_active_disp(idle_detector)
|
793
792
|
|
794
793
|
top_lines = [
|
795
794
|
f"[blue]{engine['name']}[/blue] {run_disp} {active_disp}\n",
|
@@ -895,9 +894,10 @@ def engine_status(
|
|
895
894
|
status_lines.append(
|
896
895
|
f" • GPU Drivers: {'OK' if health.get('drivers_ok') else 'MISSING'}"
|
897
896
|
)
|
898
|
-
|
899
|
-
|
897
|
+
idle_stat = health.get("idle_detector_service") or health.get(
|
898
|
+
"idle_detector_timer", "unknown"
|
900
899
|
)
|
900
|
+
status_lines.append(f" • Idle Detector: {idle_stat}")
|
901
901
|
except Exception:
|
902
902
|
pass
|
903
903
|
|
@@ -1005,6 +1005,13 @@ def engine_status(
|
|
1005
1005
|
for k, v in overlay.items():
|
1006
1006
|
idle_detector.setdefault(k, v)
|
1007
1007
|
|
1008
|
+
# Recompute header display using enriched overlay values
|
1009
|
+
try:
|
1010
|
+
active_disp = _compute_active_disp(idle_detector)
|
1011
|
+
top_lines[0] = f"[blue]{engine['name']}[/blue] {run_disp} {active_disp}\n"
|
1012
|
+
except Exception:
|
1013
|
+
pass
|
1014
|
+
|
1008
1015
|
# Activity Sensors (show all with YES/no)
|
1009
1016
|
if idle_detector.get("available"):
|
1010
1017
|
status_lines.append("")
|
@@ -2681,7 +2688,7 @@ def idle_timeout_cmd(
|
|
2681
2688
|
cmd = (
|
2682
2689
|
"sudo sed -i '/^IDLE_TIMEOUT_SECONDS=/d' /etc/engine.env && "
|
2683
2690
|
f"echo 'IDLE_TIMEOUT_SECONDS={seconds}' | sudo tee -a /etc/engine.env >/dev/null && "
|
2684
|
-
"sudo systemctl restart engine-idle-detector.
|
2691
|
+
"sudo systemctl restart engine-idle-detector.service"
|
2685
2692
|
)
|
2686
2693
|
|
2687
2694
|
resp = ssm.send_command(
|
@@ -2820,8 +2827,7 @@ def repair_engine(
|
|
2820
2827
|
"echo 'finished' | sudo tee /opt/dayhoff/state/engine-init.stage > /dev/null",
|
2821
2828
|
# Ensure SSM agent is running
|
2822
2829
|
"sudo systemctl restart amazon-ssm-agent 2>/dev/null || true",
|
2823
|
-
# Restart idle detector
|
2824
|
-
"sudo systemctl restart engine-idle-detector.timer 2>/dev/null || true",
|
2830
|
+
# Restart idle detector (service only)
|
2825
2831
|
"sudo systemctl restart engine-idle-detector.service 2>/dev/null || true",
|
2826
2832
|
# Report status
|
2827
2833
|
"echo '=== Repair Complete ===' && echo 'Sentinel: ' && ls -la /opt/dayhoff/first_boot_complete.sentinel",
|
@@ -3,7 +3,7 @@ dayhoff_tools/chemistry/standardizer.py,sha256=uMn7VwHnx02nc404eO6fRuS4rsl4dvSPf
|
|
3
3
|
dayhoff_tools/chemistry/utils.py,sha256=jt-7JgF-GeeVC421acX-bobKbLU_X94KNOW24p_P-_M,2257
|
4
4
|
dayhoff_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
5
5
|
dayhoff_tools/cli/cloud_commands.py,sha256=33qcWLmq-FwEXMdL3F0OHm-5Stlh2r65CldyEZgQ1no,40904
|
6
|
-
dayhoff_tools/cli/engine_commands.py,sha256=
|
6
|
+
dayhoff_tools/cli/engine_commands.py,sha256=sJroAFeJqHBMwONTLTFUNfuJf0PvN6xu-OBoVS_b4uU,107111
|
7
7
|
dayhoff_tools/cli/main.py,sha256=LoFs3SI4fdCjP4pdxEAhri-_q0dmNYupmBCRE4KbBac,5933
|
8
8
|
dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
|
9
9
|
dayhoff_tools/cli/utility_commands.py,sha256=WQTHOh1MttuxaJjl2c6zMa4x7_JuaKMQgcyotYrU3GA,25883
|
@@ -27,7 +27,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
|
|
27
27
|
dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
|
28
28
|
dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
|
29
29
|
dayhoff_tools/warehouse.py,sha256=UETBtZD3r7WgvURqfGbyHlT7cxoiVq8isjzMuerKw8I,24475
|
30
|
-
dayhoff_tools-1.9.
|
31
|
-
dayhoff_tools-1.9.
|
32
|
-
dayhoff_tools-1.9.
|
33
|
-
dayhoff_tools-1.9.
|
30
|
+
dayhoff_tools-1.9.4.dist-info/METADATA,sha256=fZi-XFFqeuhdjIIEJKkVN2bpMjyIO6q2G6RcaCURZLk,2914
|
31
|
+
dayhoff_tools-1.9.4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
32
|
+
dayhoff_tools-1.9.4.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
33
|
+
dayhoff_tools-1.9.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|