dayhoff-tools 1.6.12__py3-none-any.whl → 1.6.13__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.
@@ -1867,14 +1867,22 @@ def _attempt_studio_attach(studio, engine, target_user, public_key):
1867
1867
  # Asynchronous path – API returned 202 Accepted and operation tracking ID
1868
1868
  if response.status_code == 202:
1869
1869
  op_id = response.json().get("operation_id")
1870
- if not op_id:
1871
- return False, "Async operation started but no operation_id returned"
1872
- console.print(f"[dim]DEBUG: Got 202 - polling operation {op_id}[/dim]")
1873
- poll_ok, poll_err = _poll_operation(op_id)
1874
- console.print(f"[dim]DEBUG: Poll result: ok={poll_ok}, err={poll_err}[/dim]")
1875
- if poll_ok:
1876
- return True, None
1877
- return False, poll_err
1870
+ console.print(f"[dim]DEBUG: Got 202 - operation {op_id} started[/dim]")
1871
+
1872
+ # Instead of polling the operation status (which seems broken),
1873
+ # just wait a bit and check if the studio is actually attached
1874
+ # This is what dh studio status does and it works reliably
1875
+ time.sleep(5) # Give the async operation a moment to start
1876
+
1877
+ # Now check periodically if the studio is attached
1878
+ for check in range(20): # Check for up to 60 seconds
1879
+ if _is_studio_attached(studio["studio_id"], engine["instance_id"]):
1880
+ console.print("[dim]DEBUG: Studio attachment detected via status check[/dim]")
1881
+ return True, None
1882
+ time.sleep(3)
1883
+
1884
+ # If we get here, attachment didn't complete in reasonable time
1885
+ return False, None # Return None to trigger retry
1878
1886
 
1879
1887
  # --- determine if we should retry ---
1880
1888
  recoverable = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.6.12
3
+ Version: 1.6.13
4
4
  Summary: Common tools for all the repos at Dayhoff Labs
5
5
  Author: Daniel Martin-Alarcon
6
6
  Author-email: dma@dayhofflabs.com
@@ -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=jwt8FT8OIo84WsK1DyPMhtgW0A9zcCQEs8TMe9_eN_w,97598
6
+ dayhoff_tools/cli/engine_commands.py,sha256=Loc-ppwuuuAZbj5j2s0aNT5_R1u7oiOx7bDjjWuw3y8,98069
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.12.dist-info/METADATA,sha256=5d5ID87KXCLeyx72erKxySLWi9JjLJhAF9SDD5RRG6g,2915
31
- dayhoff_tools-1.6.12.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
- dayhoff_tools-1.6.12.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
- dayhoff_tools-1.6.12.dist-info/RECORD,,
30
+ dayhoff_tools-1.6.13.dist-info/METADATA,sha256=Vj0JcsRhUcJE8witxYBmGTiCWLdunubI_01WecoV3Xw,2915
31
+ dayhoff_tools-1.6.13.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ dayhoff_tools-1.6.13.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
+ dayhoff_tools-1.6.13.dist-info/RECORD,,