![]() |
Belle II Software
release-06-01-15
|
Public Member Functions | |
def | __init__ (self, job, job_id) |
def | update_status (self) |
def | ready (self) |
def | get_exit_code_from_file (self) |
Public Attributes | |
job_id | |
job id given by HTCondor | |
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. | |
Static Public Attributes | |
dictionary | backend_code_to_status |
HTCondor statuses mapped to Job statuses. More... | |
Private Member Functions | |
def | _update_result_status (self, condor_q_output) |
Private Attributes | |
_is_ready | |
Quicker way to know if it's ready once it has already been found. More... | |
Simple class to help monitor status of jobs submitted by HTCondor Backend. You pass in a `Job` object and job id from a condor_submit command. When you call the `ready` method it runs condor_q and, if needed, ``condor_history`` to see whether or not the job has finished.
Definition at line 1972 of file backends.py.
def __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 1991 of file backends.py.
|
private |
In order to be slightly more efficient we pass in a previous call to condor_q to see if it can work. If it is there we update the job's status. If not we are forced to start calling condor_q and, if needed, ``condor_history``, etc. Parameters: condor_q_output (dict): The JSON output of a previous call to `HTCondor.condor_q` which we can re-use to find the status of this job if it was active when that command ran.
Definition at line 2013 of file backends.py.
|
inherited |
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.
|
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 858 of file backends.py.
def update_status | ( | self | ) |
Update the job's (or subjobs') status by calling condor_q.
Reimplemented from Result.
Definition at line 2000 of file backends.py.
|
privateinherited |
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.
|
static |
HTCondor statuses mapped to Job statuses.
Definition at line 1982 of file backends.py.