Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Dynamically changing HTCondor configuration when using python binding
- Date: Fri, 6 Dec 2019 17:29:00 +0000
- From: John M Knoeller <johnkn@xxxxxxxxxxx>
- Subject: Re: [HTCondor-users] Dynamically changing HTCondor configuration when using python binding
1) sorry no. htcondor.reload_config() will always use the file pointed to by the CONDOR_CONFIG environment variable if it is set.
2) yes. But keep in mind that changes made this way will not be visible to sub-processes (if you should use any)
3) no. what you are doing is what we intended.
-tj
-----Original Message-----
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Marco Mambelli
Sent: Thursday, December 5, 2019 5:58 PM
To: HTCondor-users <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] Dynamically changing HTCondor configuration when using python binding
Greetings,
I'm using some HTCondor commands from a python program either wrapping the binaries or using the bindings (when available).
I need to change dynamically and programmatically some configuration parameters.
When wrapping the commands I'm using os.environ[] to set variables like CONDOR_CONFIG or _CONDOR_...
This works because the commands are in a subshell.
os.environ is not affecting the current environment (of the running interpreter) and the python bindings are executed there, therefore ignoring these changes. I'd like to avoid to have to re-invoke the interpreter in a subprocess.
1. Is it there a way to specify a config file to htcondor.reload_config(), e.g the path in CONDOR_CONFIG from os.environ, not from the environment at the invocation of the python interpreter?
2. And then should I modify the content of htcondor.param (_Param object) with what is in the _CONDOR_... variables?
3. Is it there another better way to change the configuration when using the bindings?
Thank you,
Marco
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/