From 5f254be283db2c17c1aebd666c1fc1ffadc47c92 Mon Sep 17 00:00:00 2001 From: Arun Date: Fri, 18 Oct 2024 16:37:26 +0530 Subject: [PATCH] fix(devboxes): devboxes init function --- agent/server.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/server.py b/agent/server.py index 53f0ebda..e9074072 100644 --- a/agent/server.py +++ b/agent/server.py @@ -785,9 +785,15 @@ def find_available_ports(self, num_ports, starting_port=49152, ending_port=65535 return available_ports + @step("Initialize Bench") + def devbox_init(self, devbox_name): + devboxes_directory = os.path.join(self.devboxes_directory, devbox_name) + os.mkdir(devboxes_directory) + @job("New Devbox", priority="low") def new_devbox(self, devbox_name): websockify_port = self.find_available_ports(num_ports=1)[0] + self.devbox_init() devbox = Devbox(devbox_name=devbox_name, server=self, websockify_port=websockify_port) devbox.run_devbox() devbox.setup_nginx()