Submit Class
- class htcondor2.Submit(input=None, queue=None, **kwargs)
An object representing a job submit description. It uses the same language as condor_submit. Values in the submit description language have no type; they are all strings.
If input is a dictionary, it will be serialized into the submit language. Otherwise, input is a string in the submit language. This string may end with a queue statement. You may not specify a queue statement in an input dictionary; use the queue keyword argument to specify its arguments, instead. (You may preface the the keyword’s string value with “queue “, if you prefer.)
If other keyword arguments are supplied, they will update this object after the submit-language string, if any, is parsed.
This object implements the Python dictionary protocol, except that attempts to
del()entries will raise aNotImplementedErrorbecause the underlying logic does not distinguish between a missing key and a key whose value is the empty string. (This seems better than allowing you todel(s[key])but havingkeystill appear ins.keys().)- static from_dag(filename, options={}) Submit
Returns a
Submitobject that can be used to submit the DAG specified in the file filename.
- static from_dag_options()
Prints a table of valid keys for the
optionsdictionary passed tofrom_dag(), the type of each key, and the short description from condor_submit_dag’s-helpoutput.This function is useful if you don’t have an installed copy of condor_submit_dag or if this module and that command-line tool could be from different versions.
Note
Not all options available to condor_submit_dag exist for the python bindings.
- getSubmitMethod() int
Returns the submit method.
- Returns
The integer value of the submit method. The symbolic value can be obtained from the
SubmitMethodenumeration.- Return type
- issue_credentials() Optional[str]
Issue credentials for this job description.
Note
As with condor_submit, this assumes that the local machine is the target AP.
- itemdata(qargs=None) Union[Iterator[str], Iterator[dict]]
Returns an iterator over the itemdata specified by the given arguments to a queue statement, suitable for passing to
schedd.Submit().s.itemdata()is equivalent tos.itemdata(s.getQAargs()).- Parameters
qargs (str) – A set of arguments for a queue statement. May start with “queue “.
- jobs(count=0, itemdata=None, clusterid=1, procid=0, qdate=0, owner='')
This function is not currently implemented.
- procs(count=0, itemdata=None, clusterid=1, procid=0, qdate=0, owner='')
This function is not currently implemented.
- setQArgs(args)
Set the arguments to the queue statement. These arguments replace the arguments, if any, passed to the original constructor.
- Parameters
args (str) – The arguments. May start with “queue “.
- setSubmitMethod(method_value=-1, allow_reserved_values=False)
By default, jobs created by this class record (in the job ad attribute JobSubmitMethod) that they were submitted via the Python bindings. Calling this method before submitting allows you to change that. Values between
0(inclusive) and100(exclusive) are reserved forhtcondor2.SubmitMethodand can’t be set unless theallowed_reserved_valuesflag isTrue. Values less than 0 may be used to removeJobSubmitMethodfrom the job ad entirely.- Parameters
method_value (Union[SubmitMethod, int]) – The method to record.
allowed_reserved_values – Set to true to used a reserved
method_value.