Skip to content

Commit

Permalink
fix(devboxes): devboxes init function
Browse files Browse the repository at this point in the history
  • Loading branch information
arunmathaisk committed Oct 18, 2024
1 parent c9f4071 commit 5f254be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agent/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 5f254be

Please sign in to comment.