From fc435027deaf3f2bc2a394d13c0a5e47f12b32a9 Mon Sep 17 00:00:00 2001 From: Nuvole Date: Sat, 9 Nov 2024 10:45:40 +0800 Subject: [PATCH] feat: remove tmp directory --- joj3_config_generator/convert.py | 2 +- joj3_config_generator/lib/repo.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/joj3_config_generator/convert.py b/joj3_config_generator/convert.py index 13de522..6ac270c 100644 --- a/joj3_config_generator/convert.py +++ b/joj3_config_generator/convert.py @@ -28,7 +28,7 @@ def convert(repo_conf: repo.Config, task_conf: task.Config) -> result.Config: ) # Construct healthcheck stage - healthcheck_stage = getHealthcheckConfig(repo_conf, task_conf) + healthcheck_stage = getHealthcheckConfig(repo_conf) result_conf.stage.stages.append(healthcheck_stage) cached: list[str] = [] # Convert each stage in the task configuration diff --git a/joj3_config_generator/lib/repo.py b/joj3_config_generator/lib/repo.py index 59f94f9..669f3f8 100644 --- a/joj3_config_generator/lib/repo.py +++ b/joj3_config_generator/lib/repo.py @@ -48,7 +48,7 @@ def getHealthcheckCmd(repo_conf: Repo) -> Cmd: else: immutable_files = immutable_files + name + "," # FIXME: need to make solution and make things easier to edit with global scope - chore = f"/tmp/repo-health-checker -root=. " + chore = f"./repo-health-checker -root=. " args = "" args = args + chore args = args + repo_size @@ -63,14 +63,14 @@ def getHealthcheckCmd(repo_conf: Repo) -> Cmd: args=args.split(), # FIXME: easier to edit within global scope copy_in={ - f"/tmp/repo-health-checker": result.CmdFile(src=f"/tmp/repo-health-checker") + f"./repo-health-checker": result.CmdFile(src=f"./repo-health-checker") }, ) return cmd -def getHealthcheckConfig(repo_conf: Repo, task_conf: Task) -> Stage: - healthcheck_stage = Stage( +def getHealthcheckConfig(repo_conf: repo.Config) -> result.StageDetail: + healthcheck_stage = result.StageDetail( name="healthcheck", group="", executor=ExecutorConfig(