Page 1 of 1

*FIRST POST* while cluster.wait()

Posted: Sat Jan 23, 2021 11:23 am
by odo2063
Hi!

Is it possible to do something like

Code: Select all

while cluster.wait():
    time.sleep(10)
    cluster.print_status()
with dispy?

Re: *FIRST POST* while cluster.wait()

Posted: Tue Jan 26, 2021 5:39 am
by Giri
I haven't tried it, but something like this should be possible:

Code: Select all

while 1:
    cluster.print_status()
    if not cluster.wait(timeout=10):
        break
I don't remember if "not" in condition is required or not.