Submit
Class
- class htcondor2.Submit(input=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.
If 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 aNotImplementedError
because 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 havingkey
still appear ins.keys()
.)- expand(attr)
Expand all macros for the given attribute.
- static from_dag(filename, options={})
Returns a
Submit
object 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
options
dictionary passed tofrom_dag()
, the type of each key, and the short description from condor_submit_dag’s-help
output.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()
Returns the submit method.
- Return type
- Returns
The integer value of the submit method. The symbolic value can be obtained from the
SubmitMethod
enumeration.
- issue_credentials()
Issue credentials for this job description.
Note
As with condor_submit, this assumes that the local machine is the target AP.
- itemdata(qargs=None)
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())
.
- 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 queue arguments.
- 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.SubmitMethod
and can’t be set unless theallowed_reserved_values
flag isTrue
. Values less than 0 may be used to removeJobSubmitMethod
from 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
.