Skip to content

Commit 0957dfb

Browse files
committed
fix: adjusted wording
1 parent 84abbc3 commit 0957dfb

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

snakemake_executor_plugin_slurm/job_status_query.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,12 @@ def should_recommend_squeue_status_command(min_threshold_seconds=120):
101101
return False
102102

103103

104-
def query_job_status_sacct(jobuid) -> list:
104+
def query_job_status_sacct(runid) -> list:
105105
"""
106106
Query job status using sacct command
107107
108108
Args:
109-
job_ids: List of SLURM job IDs
110-
timeout: Timeout in seconds for subprocess call
109+
runid: workflow run ID
111110
112111
Returns:
113112
Dictionary mapping job ID to JobStatus object
@@ -125,33 +124,31 @@ def query_job_status_sacct(jobuid) -> list:
125124
--clusters all \
126125
--noheader --format=JobIdRaw,State \
127126
--starttime {sacct_starttime} \
128-
--endtime now --name {jobuid}"""
127+
--endtime now --name {runid}"""
129128

130129
# for better redability in verbose output
131130
query_command = " ".join(shlex.split(query_command))
132131

133132
return query_command
134133

135134

136-
def query_job_status_squeue(jobuid) -> list:
135+
def query_job_status_squeue(runid) -> list:
137136
"""
138137
Query job status using squeue command (newer SLURM functionality)
139138
140139
Args:
141-
job_ids: List of SLURM job IDs
142-
timeout: Timeout in seconds for subprocess call
140+
runid: workflow run ID
143141
144142
Returns:
145143
Dictionary mapping job ID to JobStatus object
146144
"""
147145
# Build squeue command
148-
query_command = [
149-
"squeue",
150-
"--format=%i|%T",
151-
"--states=all",
152-
"--noheader",
153-
"--name",
154-
f"{jobuid}",
155-
]
146+
query_command = f"""squeue
147+
--format=%i|%T
148+
--states=all
149+
--noheader
150+
--name {runid}"""
151+
# for better redability in verbose output
152+
query_command = " ".join(shlex.split(query_command))
156153

157154
return query_command

0 commit comments

Comments
 (0)