Skip to content

Commit

Permalink
feat: check db port at bench level if not found at site level
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabh6790 committed Aug 13, 2024
1 parent bacf86a commit 2613fa8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions agent/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(self, name, server, mounts=None):
self.directory, "sites", "common_site_config.json"
)
self.host = self.config.get("db_host", "localhost")
self.db_port = self.config.get("db_port", "3306")
self.docker_image = self.bench_config.get("docker_image")
self.mounts = mounts
if not (
Expand Down
2 changes: 1 addition & 1 deletion agent/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self, name: str, bench: "Bench"):
self.user = self.config["db_name"]
self.password = self.config["db_password"]
self.host = self.config.get("db_host", self.bench.host)
self.port = self.config.get("db_port", '3306')
self.port = self.config.get("db_port", self.bench.db_port)

def bench_execute(self, command, input=None):
return self.bench.docker_execute(
Expand Down

0 comments on commit 2613fa8

Please sign in to comment.