dreadnode 2.0.36__py3-none-any.whl → 2.0.37__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.
- dreadnode/core/environment.py +22 -6
- {dreadnode-2.0.36.dist-info → dreadnode-2.0.37.dist-info}/METADATA +1 -1
- {dreadnode-2.0.36.dist-info → dreadnode-2.0.37.dist-info}/RECORD +6 -6
- {dreadnode-2.0.36.dist-info → dreadnode-2.0.37.dist-info}/WHEEL +0 -0
- {dreadnode-2.0.36.dist-info → dreadnode-2.0.37.dist-info}/entry_points.txt +0 -0
- {dreadnode-2.0.36.dist-info → dreadnode-2.0.37.dist-info}/licenses/LICENSE +0 -0
dreadnode/core/environment.py
CHANGED
|
@@ -215,16 +215,32 @@ class TaskEnvironment(Environment):
|
|
|
215
215
|
wait bounded by ``deadline_sec`` (caller's ``timeout_sec`` when set,
|
|
216
216
|
otherwise the module default). A ``failed`` status raises with the
|
|
217
217
|
server-provided error message.
|
|
218
|
+
|
|
219
|
+
A just-created environment's status can 404 for the first few polls: the
|
|
220
|
+
platform tracks the pending env in per-replica memory until the sandbox
|
|
221
|
+
row is persisted, so a status poll routed to a different API replica than
|
|
222
|
+
the one that handled the POST sees neither the tracker entry nor the row
|
|
223
|
+
yet. Treat that 404 as "still provisioning" and keep polling until the
|
|
224
|
+
deadline instead of aborting a provision that will succeed.
|
|
218
225
|
"""
|
|
226
|
+
from dreadnode.app.api.client import NotFoundError
|
|
227
|
+
|
|
219
228
|
interval = 1.0
|
|
220
229
|
deadline = asyncio.get_event_loop().time() + deadline_sec
|
|
221
230
|
while True:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
231
|
+
try:
|
|
232
|
+
status = await asyncio.to_thread(
|
|
233
|
+
self.api_client.get_environment_status,
|
|
234
|
+
self.org,
|
|
235
|
+
self.workspace,
|
|
236
|
+
environment_id,
|
|
237
|
+
)
|
|
238
|
+
except NotFoundError:
|
|
239
|
+
if asyncio.get_event_loop().time() >= deadline:
|
|
240
|
+
raise
|
|
241
|
+
await asyncio.sleep(interval)
|
|
242
|
+
interval = min(interval * 1.5, _POLL_MAX_INTERVAL_SEC)
|
|
243
|
+
continue
|
|
228
244
|
state = status.get("state")
|
|
229
245
|
if state == "ready":
|
|
230
246
|
return status
|
|
@@ -419,7 +419,7 @@ dreadnode/capabilities/worker_runner.py,sha256=_qqWT26JQBWBXu_PgX94fLkL5ykMLllE9
|
|
|
419
419
|
dreadnode/core/__init__.py,sha256=hJuoWE9VXUZrmnpRN0DDyataXKKnLSuDeoDBQvcNhQA,2751
|
|
420
420
|
dreadnode/core/conditions.py,sha256=KDswJ4vVYW3xHFQ7WsPg7MyR38ZzF6u-givZGm4tNxs,37219
|
|
421
421
|
dreadnode/core/discovery.py,sha256=vD_1ETS4RCL97rHyfoRF69rr3EeVCwdrAPy2OmPyEx8,6663
|
|
422
|
-
dreadnode/core/environment.py,sha256
|
|
422
|
+
dreadnode/core/environment.py,sha256=-BGKgIpy9YAEyVnxRzoX2Mi0IIUZrJJOknIjj-bcU6k,20752
|
|
423
423
|
dreadnode/core/exceptions.py,sha256=zO8F-9HV4ReD3slFAA_vOul2-52uHLp745Rkc0UEsK4,7134
|
|
424
424
|
dreadnode/core/execution.py,sha256=72ejZaj8iZQ0_ELqaRpYQysjRgIpWjavURtxixvOr_c,6745
|
|
425
425
|
dreadnode/core/hook.py,sha256=fcenhloxGmubPk5gTifq60NigJepsGqWgNiju6gTqoM,7988
|
|
@@ -704,8 +704,8 @@ dreadnode/transforms/system_prompt_extraction.py,sha256=rtWKibIipr1tmFH3P95UE4W4
|
|
|
704
704
|
dreadnode/transforms/text.py,sha256=8qEldTVeXblxxCCU31Q2MGx3dccMxESOoSga-Y87Mnk,19923
|
|
705
705
|
dreadnode/transforms/video.py,sha256=pWPSAN3YokvWpYsAOvOVH1d2Zd5JPldl17ICw1532a8,33136
|
|
706
706
|
dreadnode/transforms/xml_tools.py,sha256=Zj2sdvmyCoVLua4XkWnKYFRmS8ZFSWrQ5nunspCqpM4,15057
|
|
707
|
-
dreadnode-2.0.
|
|
708
|
-
dreadnode-2.0.
|
|
709
|
-
dreadnode-2.0.
|
|
710
|
-
dreadnode-2.0.
|
|
711
|
-
dreadnode-2.0.
|
|
707
|
+
dreadnode-2.0.37.dist-info/METADATA,sha256=k344TKwfQpUqwCdShD2dpMz7FApjK9iGH5UI2suKsAY,13481
|
|
708
|
+
dreadnode-2.0.37.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
|
|
709
|
+
dreadnode-2.0.37.dist-info/entry_points.txt,sha256=LvV-eGt7GlPEHy1YDiClWhr4qbsX_D9l0_QNo0j_XPI,81
|
|
710
|
+
dreadnode-2.0.37.dist-info/licenses/LICENSE,sha256=UMJAkT3OxyPBvOmQ74h_1v8DYFRYIfMfFiaP2lFZCmc,11375
|
|
711
|
+
dreadnode-2.0.37.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|