dayhoff-tools 1.9.6__py3-none-any.whl → 1.9.7__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 +34 -43
- {dayhoff_tools-1.9.6.dist-info → dayhoff_tools-1.9.7.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.9.6.dist-info → dayhoff_tools-1.9.7.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.9.6.dist-info → dayhoff_tools-1.9.7.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.9.6.dist-info → dayhoff_tools-1.9.7.dist-info}/entry_points.txt +0 -0
@@ -710,19 +710,13 @@ def engine_status(
|
|
710
710
|
|
711
711
|
# Fast status display (default)
|
712
712
|
if not detailed:
|
713
|
-
#
|
714
|
-
|
715
|
-
|
716
|
-
console.print("[red]❌ Failed to fetch engine details[/red]")
|
717
|
-
raise typer.Exit(1)
|
718
|
-
|
719
|
-
engine_details = response.json()
|
720
|
-
engine = engine_details.get("engine", engine)
|
721
|
-
attached_studios = engine_details.get("attached_studios", [])
|
713
|
+
# Skip the API call for studios - use basic info we already have
|
714
|
+
attached_studios = []
|
715
|
+
studio_user = engine.get("user") # Use the engine's user as studio owner
|
722
716
|
|
723
717
|
# Fetch idle status via SSM with longer timeout
|
724
718
|
ssm = boto3.client("ssm", region_name="us-east-1")
|
725
|
-
idle_data =
|
719
|
+
idle_data = None # Use None to indicate no data received
|
726
720
|
|
727
721
|
if engine["state"].lower() == "running":
|
728
722
|
try:
|
@@ -751,11 +745,10 @@ def engine_status(
|
|
751
745
|
content = inv["StandardOutputContent"].strip()
|
752
746
|
if content and content != "{}":
|
753
747
|
idle_data = json.loads(content)
|
748
|
+
else:
|
749
|
+
idle_data = {} # Empty response but SSM worked
|
754
750
|
except Exception:
|
755
|
-
|
756
|
-
|
757
|
-
# Build status display
|
758
|
-
hourly_cost = HOURLY_COSTS.get(engine["engine_type"], 0)
|
751
|
+
idle_data = None # SSM failed
|
759
752
|
|
760
753
|
# Determine running state display
|
761
754
|
running_state = engine["state"].lower()
|
@@ -773,48 +766,46 @@ def engine_status(
|
|
773
766
|
# Determine idle/active status
|
774
767
|
idle_disp = ""
|
775
768
|
if running_state == "running":
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
remaining = max(0, timeout_sec - idle_seconds)
|
783
|
-
idle_disp = f" [yellow]Idle {idle_seconds//60}m/{timeout_sec//60}m: [red]{remaining//60}m {remaining%60}s[/red] left[/yellow]"
|
784
|
-
else:
|
785
|
-
idle_disp = " [yellow]Idle ?/?[/yellow]"
|
769
|
+
if idle_data is None:
|
770
|
+
# SSM failed - we don't know the status
|
771
|
+
idle_disp = " [dim]N/A[/dim]"
|
772
|
+
elif not idle_data:
|
773
|
+
# Empty data - likely very early in boot
|
774
|
+
idle_disp = " [dim]N/A[/dim]"
|
786
775
|
else:
|
787
|
-
|
776
|
+
# We have data
|
777
|
+
is_idle = idle_data.get("idle", False)
|
778
|
+
timeout_sec = idle_data.get("timeout_sec")
|
779
|
+
idle_seconds = idle_data.get("idle_seconds", 0) if is_idle else 0
|
780
|
+
|
781
|
+
if is_idle:
|
782
|
+
if isinstance(timeout_sec, int) and isinstance(idle_seconds, int):
|
783
|
+
remaining = max(0, timeout_sec - idle_seconds)
|
784
|
+
idle_disp = f" [yellow]Idle {idle_seconds//60}m/{timeout_sec//60}m: [red]{remaining//60}m {remaining%60}s[/red] left[/yellow]"
|
785
|
+
else:
|
786
|
+
idle_disp = " [yellow]Idle ?/?[/yellow]"
|
787
|
+
else:
|
788
|
+
# Actively not idle
|
789
|
+
idle_disp = " [green]Active[/green]"
|
788
790
|
|
789
|
-
# Build status lines
|
791
|
+
# Build status lines - minimal info for fast view
|
790
792
|
status_lines = [
|
791
793
|
f"[blue]{engine['name']}[/blue] {run_disp}{idle_disp}\n",
|
792
794
|
]
|
793
795
|
|
794
|
-
# Add
|
795
|
-
if
|
796
|
-
|
797
|
-
status_lines.append(f"Studios: {', '.join(studio_names)}")
|
798
|
-
|
799
|
-
status_lines.append("") # blank line
|
800
|
-
|
801
|
-
# Basic info
|
802
|
-
status_lines.extend([
|
803
|
-
f"Type: {engine['engine_type']} ({engine['instance_type']})",
|
804
|
-
f"User: {engine['user']}",
|
805
|
-
f"IP: {engine.get('public_ip', 'N/A')}",
|
806
|
-
f"$/hour: ${hourly_cost:.2f}",
|
807
|
-
])
|
796
|
+
# Add studio owner if known
|
797
|
+
if studio_user:
|
798
|
+
status_lines.append(f"Studio: [magenta]{studio_user}[/magenta]")
|
808
799
|
|
809
800
|
# Add activity sensors if we have idle data
|
810
|
-
if idle_data.get("reasons"):
|
801
|
+
if idle_data and idle_data.get("reasons"):
|
811
802
|
status_lines.append("")
|
812
803
|
status_lines.append("[bold]Activity:[/bold]")
|
813
804
|
|
814
805
|
sensor_map = {
|
815
806
|
"CoffeeLockSensor": ("☕", "Coffee"),
|
816
807
|
"ActiveLoginSensor": ("🐚", "SSH"),
|
817
|
-
"IDEConnectionSensor": ("🖥", "IDE"),
|
808
|
+
"IDEConnectionSensor": ("🖥 ", "IDE"),
|
818
809
|
"DockerWorkloadSensor": ("🐳", "Docker"),
|
819
810
|
}
|
820
811
|
|
@@ -822,7 +813,7 @@ def engine_status(
|
|
822
813
|
sensor = r.get("sensor", "Unknown")
|
823
814
|
active = r.get("active", False)
|
824
815
|
icon, label = sensor_map.get(sensor, ("?", sensor))
|
825
|
-
status_str = "[green]YES[/green]" if active else "[dim]
|
816
|
+
status_str = "[green]YES[/green]" if active else "[dim]nope[/dim]"
|
826
817
|
status_lines.append(f" {icon} {label:6} {status_str}")
|
827
818
|
|
828
819
|
# Display in a nice panel
|
@@ -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=6dvAYmpg4H3ulTx3duPCd5JzQtMl6lgh1MsnotzxEC8,112564
|
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.7.dist-info/METADATA,sha256=JUzRKthCiuuhJ7UA71zTnHTTqmBm64_hjKdBR-qUgyc,2914
|
31
|
+
dayhoff_tools-1.9.7.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
32
|
+
dayhoff_tools-1.9.7.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
33
|
+
dayhoff_tools-1.9.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|