HTCJob

class lsst.ctrl.bps.htcondor.HTCJob(name, label=None, initcmds=(), initdagcmds=(), initattrs=None)

Bases: object

HTCondor job for use in building DAG.

Parameters:
name : str

Name of the job

label : str

Label that can used for grouping or lookup.

initcmds : RestrictedDict

Initial job commands for submit file.

initdagcmds : RestrictedDict

Initial commands for job inside DAG.

initattrs : dict

Initial dictionary of job attributes.

Methods Summary

add_dag_cmds(new_commands) Add DAG commands to Job (overwrite existing).
add_job_attrs(new_attrs) Add attributes to Job (overwrite existing).
add_job_cmds(new_commands) Add commands to Job (overwrite existing).
dump(fh) Dump job information to output stream.
write_dag_commands(stream) Write DAG commands for single job to output stream.
write_submit_file(submit_path[, job_subdir]) Write job description to submit file.

Methods Documentation

add_dag_cmds(new_commands)

Add DAG commands to Job (overwrite existing).

Parameters:
new_commands : dict

DAG file commands to be added to Job

add_job_attrs(new_attrs)

Add attributes to Job (overwrite existing).

Parameters:
new_attrs : dict

Attributes to be added to Job

add_job_cmds(new_commands)

Add commands to Job (overwrite existing).

Parameters:
new_commands : dict

Submit file commands to be added to Job.

dump(fh)

Dump job information to output stream.

Parameters:
fh : TextIOBase

Output stream

write_dag_commands(stream)

Write DAG commands for single job to output stream.

Parameters:
stream : IO or str

Output Stream

write_submit_file(submit_path, job_subdir='')

Write job description to submit file.

Parameters:
submit_path : str

Prefix path for the submit file.

job_subdir : str, optional

Template for job subdir.