Job
- class falconry.job(name: str, schedd: ScheddWrapper)
Submits and holds a single job and all relevant information
The schedd can be imported as:
from falconry import ScheddWrapper schedd = ScheddWrapper()
or from the manager:
from falconry import manager mgr = manager.Manager(mgrDir, mgrMsg) schedd = mgr.schedd
Currently planning to keep single job per clusterID, since group submittion would significantly complicate resubmitting. HTCondor does not seem to allow for re-submittion of single ProcId, so one would have to first connect specific arguments to specific ProcIds and then resubmit individual jobs anyway.
- Parameters:
name (str) – name of the job for easy identification
schedd (ScheddWrapper) – HTCondor schedd wrapper
- add_job_dependency(*args: job) None
Add dependencies to the job.
- Parameters:
*args (List["job"]) – list of jobs
- get_info() Dict[str, Any]
Returns information about the job
- Returns:
dictionary containing job information
- Return type:
Dict[str, Any]
- get_status() int
Returns status of the job, as defined in translate.py
- Returns:
status of the job
- Return type:
int
- load(jobDict: Dict[str, Any]) None
Loads a job from a dictionary created using the save function.
- Parameters:
jobDict (Dict[str, Any]) – dictionary containing job information
- release() bool
Releases held job
- remove() bool
Removes the job from HTCondor
- reset() None
Resets job flags
- save() Dict[str, Any]
Returns a dictionary containing all relevant job information to be saved to a file.
- Returns:
dictionary containing job information
- Return type:
Dict[str, Any]
- set_arguments(args: str) None
Sets arguments for the job
- Parameters:
args (str) – arguments for the job
- set_custom(dict: Dict[str, str]) None
Sets custom configuration for the job from a dictionary
- Parameters:
dict (Dict[str, str]) – dictionary containing job configuration
- set_simple(exe: str, logPath: str)
Sets up a simple job with only executable and a path to log files
- Parameters:
exe (str) – path to the executable
logPath (str) – path to the log files
- set_time(runTime: int, useRequestRuntime: bool = False) None
Sets time limit for the job.
For some clusters (DESY), RequestRuntime is used instead of MaxRuntime, to use it set useRequestRuntime to True.
- Parameters:
runTime (int) – time limit in seconds
useRequestRuntime (bool, optional) – use RequestRuntime option. Defaults to False.
- submit(force: bool = False) None
Submits the job to HTCondor if either the job is not submitted, the force flag is set or the job failed.
- Parameters:
force (bool, optional) – force submission. Defaults to False.