![]() |
Belle II Software development
|
Public Member Functions | |
__init__ (self, job, job_id) | |
update_status (self) | |
ready (self) | |
get_exit_code_from_file (self) | |
Public Attributes | |
job_id = job_id | |
job id given by PBS | |
job = job | |
Job object for result. | |
time_to_wait_for_exit_code_file = timedelta(minutes=5) | |
After our first attempt to view the exit code file once the job is 'finished', how long should we wait for it to exist before timing out? | |
exit_code_file_initial_time = None | |
Time we started waiting for the exit code file to appear. | |
Static Public Attributes | |
dict | backend_code_to_status |
PBS statuses mapped to Job statuses. | |
Protected Member Functions | |
_update_result_status (self, qstat_output) | |
_get_status_from_output (self, output) | |
Protected Attributes | |
bool | _is_ready = False |
Quicker way to know if it's ready once it has already been found. | |
Simple class to help monitor status of jobs submitted by `PBS` Backend. You pass in a `Job` object (or `SubJob`) and job id from a qsub command. When you call the `ready` method it runs bjobs to see whether or not the job has finished.
Definition at line 1420 of file backends.py.
__init__ | ( | self, | |
job, | |||
job_id ) |
Pass in the job object and the job id to allow the result to do monitoring and perform post processing of the job.
Definition at line 1440 of file backends.py.
|
protected |
Get status from output
Definition at line 1499 of file backends.py.
|
protected |
Parameters: qstat_output (dict): The JSON output of a previous call to qstat which we can reuse to find the status of this job. Obviously you should only be passing a JSON dict that contains the 'Job_Id' and 'job_state' information, otherwise it is useless.
Definition at line 1462 of file backends.py.
|
inherited |
Read the exit code file to discover the exit status of the job command. Useful fallback if the job is no longer known to the job database (batch system purged it for example). Since some backends may take time to download the output files of the job back to the working directory we use a time limit on how long to wait.
Definition at line 908 of file backends.py.
|
inherited |
Returns whether or not this job result is known to be ready. Doesn't actually change the job status. Just changes the 'readiness' based on the known job status.
Definition at line 887 of file backends.py.
update_status | ( | self | ) |
Update the job's (or subjobs') status by calling qstat.
Reimplemented from Result.
Definition at line 1449 of file backends.py.
|
protectedinherited |
Quicker way to know if it's ready once it has already been found.
Saves a lot of calls to batch system commands.
Definition at line 880 of file backends.py.
|
static |
PBS statuses mapped to Job statuses.
Definition at line 1429 of file backends.py.
|
inherited |
Time we started waiting for the exit code file to appear.
Definition at line 885 of file backends.py.
|
inherited |
Job object for result.
Definition at line 878 of file backends.py.
job_id = job_id |
job id given by PBS
Definition at line 1447 of file backends.py.
|
inherited |
After our first attempt to view the exit code file once the job is 'finished', how long should we wait for it to exist before timing out?
Definition at line 883 of file backends.py.