Skip to content

Commit

Permalink
Ensure that the sandbox has started before taking a filesystem snapsh…
Browse files Browse the repository at this point in the history
…ot (#2765)
  • Loading branch information
thecodingwizard authored Jan 16, 2025
1 parent 47890f8 commit 6608b5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modal/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ async def snapshot_filesystem(self, timeout: int = 55) -> _Image:
Returns an [`Image`](https://modal.com/docs/reference/modal.Image) object which
can be used to spawn a new Sandbox with the same filesystem.
"""
await self._get_task_id() # Ensure the sandbox has started
req = api_pb2.SandboxSnapshotFsRequest(sandbox_id=self.object_id, timeout=timeout)
resp = await retry_transient_errors(self._client.stub.SandboxSnapshotFs, req)

Expand Down

0 comments on commit 6608b5d

Please sign in to comment.