![]() |
Belle II Software
release-06-02-00
|
Public Member Functions | |
def | __init__ (self, job) |
def | ready (self) |
def | update_status (self) |
def | get_exit_code_from_file (self) |
Public Attributes | |
job | |
Job object for result. | |
time_to_wait_for_exit_code_file | |
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 | |
Time we started waiting for the exit code file to appear. | |
Private Attributes | |
_is_ready | |
Quicker way to know if it's ready once it has already been found. More... | |
Base class for Result objects. A Result is created for each `Job` (or `Job.SubJob`) object submitted to a backend. It provides a way to query a job's status to find out if it's ready.
Definition at line 838 of file backends.py.
def __init__ | ( | self, | |
job | |||
) |
Pass in the job object to allow the result to access the job's properties and do post-processing.
Definition at line 844 of file backends.py.
def get_exit_code_from_file | ( | self | ) |
Read the exit code file to discover the exit status of the job command. Useful falback 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 879 of file backends.py.
def ready | ( | self | ) |
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 858 of file backends.py.
def update_status | ( | self | ) |
Update the job's (and subjobs') status so that `Result.ready` will return the up to date status. This call will have to actually look up the job's status from some database/exit code file.
Reimplemented in HTCondor.HTCondorResult, LSF.LSFResult, PBS.PBSResult, and Local.LocalResult.
Definition at line 872 of file backends.py.
|
private |
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 851 of file backends.py.