We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00275bf commit 6d9b253Copy full SHA for 6d9b253
examples/job_info.py
@@ -1,7 +1,12 @@
1
from pythonlsf import lsf
2
3
4
-def get_job_info(jobid: int) -> lsf.jobInfoEnt:
+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
10
if lsf.lsb_init("job_info") > 0:
11
print("could not initialise the api")
12
return
@@ -25,7 +30,7 @@ def get_job_info(jobid: int) -> lsf.jobInfoEnt:
25
30
26
31
if __name__ == "__main__":
27
32
id = input("enter a job id:\n")
28
- job_info = get_job_info(int(id))
33
+ job_info = get_single_job_info(int(id))
29
34
35
print(f"job id: {job_info.jobId}\njob name: {job_info.jName}\n"
36
f"status: {job_info.status:#x}")
0 commit comments