dayhoff-tools 1.6.8__py3-none-any.whl → 1.6.9__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.
@@ -1863,6 +1863,17 @@ def _attempt_studio_attach(studio, engine, target_user, public_key):
1863
1863
  # --- determine if we should retry ---
1864
1864
  recoverable = False
1865
1865
  if response.status_code in (409, 503):
1866
+ # Special-case: 409 because studio is already in-use. If it's attached to
1867
+ # *this* engine we can safely treat it as success.
1868
+ if response.status_code == 409:
1869
+ try:
1870
+ err_text = response.json().get("error", "").lower()
1871
+ except Exception:
1872
+ err_text = ""
1873
+ # Fast path – avoid another API call when we know why we got 409.
1874
+ if "in-use" in err_text or "already attached" in err_text:
1875
+ if _is_studio_attached(studio["studio_id"], engine["instance_id"]):
1876
+ return True, None
1866
1877
  recoverable = True
1867
1878
  else:
1868
1879
  err_msg = response.json().get("error", "").lower()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.6.8
3
+ Version: 1.6.9
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=_S1JZHB_7qWXpae_eeILSTiN3lOd3-zluJGb4eiVlTU,95816
6
+ dayhoff_tools/cli/engine_commands.py,sha256=YIuMs1dgZ4a8MGE20E1pdXSND7JfB-GDUam-PqCR4c8,96415
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.8.dist-info/METADATA,sha256=V5sgvfjlpSA4Lhk-i9SHA0G5lkiHtKp5SSngi_ovVhA,2914
31
- dayhoff_tools-1.6.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
- dayhoff_tools-1.6.8.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
- dayhoff_tools-1.6.8.dist-info/RECORD,,
30
+ dayhoff_tools-1.6.9.dist-info/METADATA,sha256=mprj_aYEKyRIruTqy290fO5vdTQK4VoeY-OLPvbBpmw,2914
31
+ dayhoff_tools-1.6.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ dayhoff_tools-1.6.9.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
+ dayhoff_tools-1.6.9.dist-info/RECORD,,