Skip to content

Commit

Permalink
* Fixing #33.
Browse files Browse the repository at this point in the history
* Fixing uid() to return a timestamp without a dot so that hostname is unique
even if the server is created with others in the same second.
* Removing unused code for current_dir.
  • Loading branch information
Vitaliy Zakaznikov committed Nov 14, 2024
1 parent bbc850e commit 55edaf8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions testflows/github/hetzner/runners/scale_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class RunnerServer:

def uid():
"""Return unique id - just a timestamp."""
return str(time.time())
return str(time.time()).replace(".", "")


def get_runner_server_name(runner_name: str) -> str:
Expand Down Expand Up @@ -128,9 +128,6 @@ def server_setup(
)
GITHUB_RUNNER_TOKEN = content["token"]

with Action("Getting current directory", server_name=server.name):
current_dir = os.path.dirname(__file__)

with Action("Executing setup.sh script", server_name=server.name):
ssh(server, f"bash -s < {setup_script}", stacklevel=5)

Expand Down

0 comments on commit 55edaf8

Please sign in to comment.