dayhoff-tools 1.6.13__py3-none-any.whl → 1.6.14__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 +30 -30
- {dayhoff_tools-1.6.13.dist-info → dayhoff_tools-1.6.14.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.6.13.dist-info → dayhoff_tools-1.6.14.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.6.13.dist-info → dayhoff_tools-1.6.14.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.6.13.dist-info → dayhoff_tools-1.6.14.dist-info}/entry_points.txt +0 -0
@@ -1610,6 +1610,36 @@ def studio_status(
|
|
1610
1610
|
console.print(panel)
|
1611
1611
|
|
1612
1612
|
|
1613
|
+
def _is_studio_attached(target_studio_id: str, target_vm_id: str) -> bool:
|
1614
|
+
"""Return True when the given studio already shows as attached to the VM.
|
1615
|
+
|
1616
|
+
Using this extra check lets us stop the outer retry loop as soon as the
|
1617
|
+
asynchronous attach operation actually finishes, even in the unlikely
|
1618
|
+
event that the operation-tracking DynamoDB record is not yet updated.
|
1619
|
+
"""
|
1620
|
+
# First try the per-studio endpoint – fastest.
|
1621
|
+
resp = make_api_request("GET", f"/studios/{target_studio_id}")
|
1622
|
+
if resp.status_code == 200:
|
1623
|
+
data = resp.json()
|
1624
|
+
if (
|
1625
|
+
data.get("status") == "in-use"
|
1626
|
+
and data.get("attached_vm_id") == target_vm_id
|
1627
|
+
):
|
1628
|
+
return True
|
1629
|
+
# Fallback: list + filter (covers edge-cases where the direct endpoint
|
1630
|
+
# is slower to update IAM/APIGW mapping than the list endpoint).
|
1631
|
+
list_resp = make_api_request("GET", "/studios")
|
1632
|
+
if list_resp.status_code == 200:
|
1633
|
+
for stu in list_resp.json().get("studios", []):
|
1634
|
+
if (
|
1635
|
+
stu.get("studio_id") == target_studio_id
|
1636
|
+
and stu.get("status") == "in-use"
|
1637
|
+
and stu.get("attached_vm_id") == target_vm_id
|
1638
|
+
):
|
1639
|
+
return True
|
1640
|
+
return False
|
1641
|
+
|
1642
|
+
|
1613
1643
|
@studio_app.command("attach")
|
1614
1644
|
def attach_studio(
|
1615
1645
|
engine_name_or_id: str = typer.Argument(help="Engine name or instance ID"),
|
@@ -1710,36 +1740,6 @@ def attach_studio(
|
|
1710
1740
|
|
1711
1741
|
console.print(f"Attaching studio to engine [cyan]{engine['name']}[/cyan]...")
|
1712
1742
|
|
1713
|
-
# Helper --------------------------------------------------------------
|
1714
|
-
def _is_studio_attached(target_studio_id: str, target_vm_id: str) -> bool:
|
1715
|
-
"""Return True when the given studio already shows as attached to the VM.
|
1716
|
-
|
1717
|
-
Using this extra check lets us stop the outer retry loop as soon as the
|
1718
|
-
asynchronous attach operation actually finishes, even in the unlikely
|
1719
|
-
event that the operation-tracking DynamoDB record is not yet updated.
|
1720
|
-
"""
|
1721
|
-
# First try the per-studio endpoint – fastest.
|
1722
|
-
resp = make_api_request("GET", f"/studios/{target_studio_id}")
|
1723
|
-
if resp.status_code == 200:
|
1724
|
-
data = resp.json()
|
1725
|
-
if (
|
1726
|
-
data.get("status") == "in-use"
|
1727
|
-
and data.get("attached_vm_id") == target_vm_id
|
1728
|
-
):
|
1729
|
-
return True
|
1730
|
-
# Fallback: list + filter (covers edge-cases where the direct endpoint
|
1731
|
-
# is slower to update IAM/APIGW mapping than the list endpoint).
|
1732
|
-
list_resp = make_api_request("GET", "/studios")
|
1733
|
-
if list_resp.status_code == 200:
|
1734
|
-
for stu in list_resp.json().get("studios", []):
|
1735
|
-
if (
|
1736
|
-
stu.get("studio_id") == target_studio_id
|
1737
|
-
and stu.get("status") == "in-use"
|
1738
|
-
and stu.get("attached_vm_id") == target_vm_id
|
1739
|
-
):
|
1740
|
-
return True
|
1741
|
-
return False
|
1742
|
-
|
1743
1743
|
# Determine retry strategy based on whether we just started the engine
|
1744
1744
|
if engine_started_now:
|
1745
1745
|
max_attempts = 40 # About 7 minutes total with exponential backoff
|
@@ -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=K8Az9KfE3gAkdpHOSEB-fFu2klxIMO2D70yRUn9gIUE,97886
|
7
7
|
dayhoff_tools/cli/main.py,sha256=tRN7WCBHg6uyNp6rA54pKTCoVmBntta2i0Yas3bUpZ4,4853
|
8
8
|
dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
|
9
9
|
dayhoff_tools/cli/utility_commands.py,sha256=FRZTPrjsG_qmIIqoNxd1Q1vVkS_5w8aY33IrVYVNCLg,18131
|
@@ -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=heaYc64qplgN3_1WVPFmqj53goStioWwY5NqlWc4c0s,24453
|
30
|
-
dayhoff_tools-1.6.
|
31
|
-
dayhoff_tools-1.6.
|
32
|
-
dayhoff_tools-1.6.
|
33
|
-
dayhoff_tools-1.6.
|
30
|
+
dayhoff_tools-1.6.14.dist-info/METADATA,sha256=C3DoS5UVMxlcN6NDn5ib_BNPNcrJT-IRKOA8axug35I,2915
|
31
|
+
dayhoff_tools-1.6.14.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
32
|
+
dayhoff_tools-1.6.14.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
33
|
+
dayhoff_tools-1.6.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|