HTCondor Pool Management
- class ornithology.Condor(local_dir, config=None, raw_config=None, clean_local_dir_before=True)[source]
A
Condor
is responsible for managing the lifecycle of an HTCondor pool.- Parameters:
local_dir (
Path
) – The local directory for the HTCondor pool. All HTCondor state will be stored in this directory.config (
Optional
[Mapping
[str
,str
]]) – HTCondor configuration parameters to inject, as a mapping of key-value pairs.raw_config (
Optional
[str
]) – Raw HTCondor configuration language to inject, as a string.clean_local_dir_before (
bool
) – IfTrue
, any existing directory atlocal_dir
will be removed before trying to stand up the new instance.
- act(action, constraint='true')[source]
Perform a job action against the pool’s schedd.
- Parameters:
action –
constraint –
- direct_status(daemon_type, ad_type, constraint='true', projection=None)[source]
Perform a direct status query against a daemon.
- Parameters:
daemon_type –
ad_type –
constraint –
projection –
- edit(attr, value, constraint='true')[source]
Perform a job attribute edit action against the pool’s schedd.
- Parameters:
attr –
value –
constraint –
- property job_queue_log: Path
The
pathlib.Path
to the pool’s job queue log.
- query(constraint='true', projection=None, limit=-1, opts=htcondor.htcondor.QueryOpts.Default)[source]
Perform a job information query against the pool’s schedd.
- Parameters:
constraint –
projection –
limit –
opts –
- run_command(*args, **kwargs)[source]
Execute a command with
CONDOR_CONFIG
set to point to this HTCondor pool. Arguments and keyword arguments are passed through torun_command()
.- Return type:
- property startd_address
The address of the pool’s startd.
- status(ad_type=htcondor.htcondor.AdTypes.Any, constraint='true', projection=None)[source]
Perform a status query against the pool’s collector.
- Parameters:
ad_type –
constraint –
projection –
- submit(description, count=1, itemdata=None)[source]
Submit jobs to the pool.
Internally, this method uses the Python bindings to submit jobs and returns a rich handle object (a
ClusterHandle
) that can be used to inspect and manage the jobs.Warning
If your intent is to test job submission itself, DO NOT use this method. Instead, submit jobs by calling condor_q with
Condor.run_command()
, using the Python bindings directly, or whatever other method you want to test.- Parameters:
- Return type: