[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Using owner as a constraint



Thanks Jason,

Just what I was looking for.

Best,
Joe

On 6/19/23 7:19 AM, Jason Patton via HTCondor-users wrote:
Hi Joe,

On Sat, Jun 17, 2023 at 3:34âPM Joseph Areeda <newsreply@xxxxxxxxxx> wrote:

I'm working on a python program to find any jobs in a weird state. Long story irrelevant to the question. The point is my question is related to querying Schedd from python not running condor_q from the command line. But easier to demo there

The program will run on an AP with lots of users but I want to constrain the query to the current user.

In case it helps, you don't necessarily have to use an explicit constraint in Schedd.query() to do this, you can also provide an opts argument, specifically "opts = htcondor.QueryOpts.DefaultMyJobsOnly", which will give you the same default behavior as condor_q to show the user only their jobs.

https://htcondor.readthedocs.io/en/latest/apis/python-bindings/api/htcondor.html#htcondor.Schedd.query
https://htcondor.readthedocs.io/en/latest/apis/python-bindings/api/htcondor.html#htcondor.QueryOpts

Jason

_______________________________________________
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/