Skip to content

Commit 040ca42

Browse files
committed
Enh(aws): Better default job names for aws submit
1 parent 298975a commit 040ca42

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

aws/run_job.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,8 @@ def get_latest_job_definition_arn(self) -> str:
5858
def submit_job(self, command: list[str], job_name: str | None = None) -> str:
5959
"""Submit a job to AWS Batch."""
6060
if job_name is None:
61-
# Generate a job name based on command and timestamp
62-
cmd_name = command[0] if command else "job"
63-
cmd_name = "".join(letter.lower() for letter in cmd_name if letter.isalpha())
6461
timestamp = int(time.time())
65-
job_name = f"codeclash-{cmd_name}-{timestamp}"
62+
job_name = f"codeclash-{timestamp}"
6663

6764
# Get current git branch and prepend it to the command
6865
current_branch = get_current_git_branch()
@@ -148,7 +145,7 @@ def main():
148145
description="Submit jobs to AWS Batch",
149146
formatter_class=argparse.RawDescriptionHelpFormatter,
150147
)
151-
parser.add_argument("--job-name", help="Custom job name (auto-generated if not specified)")
148+
parser.add_argument("-n", "--job-name", help="Custom job name (auto-generated if not specified)")
152149
parser.add_argument(
153150
"--job-definition", default="codeclash-default-job", help="Job definition name (default: codeclash-default-job)"
154151
)

0 commit comments

Comments
 (0)