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

Re: [HTCondor-users] condor_wait with python bindings



I meant, "But probably there's a better solution than polling"

2014/1/29 Pek Daniel <pekdaniel@xxxxxxxxx>:
> Hi,
>
> Well, you can always poll... But there's a better solution. Here's my
> code for waiting for all the jobs being finished:
>
> import htcondor
> import time
>
> collector = htcondor.Collector()
>
> while True:
>     time.sleep(1)
>     for schedd_ad in collector.locateAll(htcondor.DaemonTypes.Schedd):
>         schedd = htcondor.Schedd(schedd_ad)
>         ads = schedd.query('true', ['ClusterId'])
>         if len(ads) > 0:
>             break
>     else:
>         break
>
> 2014/1/29 Alessandro <a.sabellico@xxxxxxxxx>:
>> Hi,
>>
>> is there a way to do a condor_wait with python bindings?
>>
>> Thank you,
>> Alessandro
>>
>> --
>>
>> "I Re, i Signori, i ricchi si sono divisi fra loro la terra inventando due
>> tremende parole, il mio e il tuo, siepe di ferro tra te e i tuoi bisogni.
>> Nessuno ha diritto al superfluo fino a che vi sarà un sol uomo che manchi
>> del necessario"
>>
>>
>> _______________________________________________
>> 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/