Skip to content

Commit 6d9b253

Browse files
rename function and add comments specifying for single jobs only
Signed-off-by: anna-singleton <annabeths111@gmail.com>
1 parent 00275bf commit 6d9b253

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/job_info.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
from pythonlsf import lsf
22

33

4-
def get_job_info(jobid: int) -> lsf.jobInfoEnt:
4+
def get_single_job_info(jobid: int) -> lsf.jobInfoEnt:
5+
"""
6+
Get the jobInfoEnt struct for a single lsf job using its jobId
7+
8+
This function does not work for array jobs, only single jobs
9+
"""
510
if lsf.lsb_init("job_info") > 0:
611
print("could not initialise the api")
712
return
@@ -25,7 +30,7 @@ def get_job_info(jobid: int) -> lsf.jobInfoEnt:
2530

2631
if __name__ == "__main__":
2732
id = input("enter a job id:\n")
28-
job_info = get_job_info(int(id))
33+
job_info = get_single_job_info(int(id))
2934

3035
print(f"job id: {job_info.jobId}\njob name: {job_info.jName}\n"
3136
f"status: {job_info.status:#x}")

0 commit comments

Comments
 (0)