Skip to content

Commit

Permalink
Fix: Error "Context has already been set"
Browse files Browse the repository at this point in the history
Solution: Handle that scenario and dismiss this specific error.
  • Loading branch information
hoh committed Oct 13, 2023
1 parent 0cb42e1 commit 4dc2269
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/aleph/vm/controllers/firecracker/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@
psutil = None # type: ignore [assignment]

logger = logging.getLogger(__name__)
set_start_method("spawn")

try:
set_start_method("spawn")
except RuntimeError as error:
if error.args == ("context has already been set",):
logger.info("Start method has already been set")
pass
else:
raise error


class ResourceDownloadError(ClientResponseError):
Expand Down

0 comments on commit 4dc2269

Please sign in to comment.