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

Re: [HTCondor-users] python api: submitting spool jobs



Nope, Schedd.spool() wants a list of jobs. 

In [28]: submit_results = schedd.submit(htcondor_job, spool=True)

In [29]: schedd.spool(submit_results)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In [29], line 1
----> 1 schedd.spool(submit_results)

File /usr/lib64/python3.9/site-packages/htcondor/_lock.py:70, in add_lock.<locals>.wrapper(*args, **kwargs)
     67 try:
     68     acquired = LOCK.acquire()
---> 70     rv = func(*args, **kwargs)
     72     # if the function returned a context manager,
     73     # create a LockedContext to manage the lock
     74     is_cm = is_context_manager(rv)

TypeError: object of type 'SubmitResult' has no len()



On 14 Nov 2024, at 16:10, Cole Bollig via HTCondor-users <htcondor-users@xxxxxxxxxxx> wrote:

Hi Ben,

I think you just need to pass the entire submit_results variable to Schedd.spool().

-Cole Bollig

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Ben Jones <ben.dylan.jones@xxxxxxxxx>
Sent: Thursday, November 14, 2024 8:55 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] python api: submitting spool jobs
 
Hi,

Iâve been trying (and failing) to submit spool jobs with the python api. Whatâs the correct workflow for the Schedd.spool() method? The docs suggest that the ad_list argument should be the list returned by the jobs() method on the submit result object. However there is no such method mentioned in the docs, nor does it appear to exist:

In [18]: submit_results.num_procs()
                         cluster()    first_proc()
                         clusterad()  num_procs()


The cluster_ad isnât enough. I naively tried to use a job list returned from a Schedd.query() based on the SubmitResult.cluster() but that doesnât work because the paths are based on the spool Iwd. Am I missing something?

cheers,
Ben
_______________________________________________
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://www-auth.cs.wisc.edu/lists/htcondor-users/
_______________________________________________
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://www-auth.cs.wisc.edu/lists/htcondor-users/