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
Parameters:
  • name (str) – name of the job for easy identification

  • schedd (ScheddWrapper) – HTCondor schedd wrapper

property act_constraints: str

Returns HTCondor constraints for the job

add_job_dependency(*args: job) None

Add dependencies to the job.

Parameters:

*args (List["job"]) – list of jobs

property clusterId: str

Returns cluster ID

expand_files() None

Expands job files with cluster and job IDs

get_info() Dict[str, Any]

Returns information about the job

Returns:

dictionary containing job information

Return type:

Dict[str, Any]

get_status() FalconryStatus

Returns status of the job, as defined in status.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

property procId: str

Returns proc ID

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) None

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, doNotSubmit: 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.

  • doNotSubmit (bool, optional) – does not submit, just updates htjob. Defaults to False.

submit_done(clusterID: str, procID: str) None

Sets the job as submitted and updates cluster ID