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

Re: [HTCondor-users] Question about deleting the history information of finished jobs submitted by the SOAP interface



On 7/26/2020 10:42 PM, zcqingxiaosun@xxxxxxxxx wrote:

Hi all,

I have noticed that when submitting jobs with the SOAP interface, the information of finished jobs is displayed when querying condor_q. I am thinking about how to safely and cleanly delete history information of these finished jobs.

The specific requirement is that after submittingÂa job with the SOAP interface, we can cleanly delete the history information of the job according to the job id, or delete the history information in batches according to the user. What can I do to achieve this requirement?



Hi Qingxiao,

Likely the only reason your jobs submitted via SOAP stay in the queue after completion is because the SOAP API createJobTemplate() call returns a job classad with the LeaveJobInQueue attribute defined to tell the schedd to keep the job until the SOAP client fetches its output files and calls closeSpool().

One thing you could do is tell the schedd to give SOAP clients an upper time limit (say 24 hours) to fetch output files; after 24 hours the schedd could automatically remove the jobs by adding the following to the config file of your schedd:

ÂÂ SOAP_LEAVE_IN_QUEUE = ((JobStatus==4) && ((ServerTime - CompletionDate) < (60 * 60 * 24)))

A complete explanation and examples to do exactly this can be found in the HTCondor 8.6.11 Manual here:
https://research.cs.wisc.edu/htcondor/manual/v8.6.11/6_1Web_Service.html#SECTION00713000000000000000

Note that HTCondor v8.6.11 is the last stable release of HTCondor to support the SOAP API. I am curious about what language you are developing in... most of our SOAP users where using Python, and our Python API is much more flexible/easy...

regards,
Todd