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

[HTCondor-users] Python bindings schedd.edit value question



We currently have a script that looks for jobs that were held for going over RequestMemory. If the user who submitted the job added a "GraceValue" of 2GB, the script will queue edit the job, and set the RequestMemory to orig_RequestMemory + GraceValue.  Then we release the jobs.  

This works in principle, but it gets a little tricky when we have a 4000 jobs in the queue all held for the same reason and but from various different users, with different GraceValues.

Is it possible when using Schedd.edit() to set a classad to the literal value of another?  Currently, if i do this

schedd.edit(job_id_num, 'orig_RequestMemory', 'RequestMemory').   

Then when I check the value of 'orig_RequestMemory' it is set to  orig_RequestMemory=RequestMemory.  

Which is fine in normal cases, but if I then do a 

schedd.edit(job_id_num, 'RequestMemory', 'orig_RequestMemory+GraceValue')   it winds up in a situation where 

orig_RequestMemory=RequestMemory
RequestMemory=orig_RequestMemory+GraceValue

And we no longer have a value for RequestMemory to match on.  As orig_RequestMemory doesn't appear an actual value associated with it.   Or at least, a value that I know how to verify

I know I can do something like a for loop, and just feed it the already calculated value, but then that ends up being a lot of calls to schedd.edit().   

--
Nick Peregonow