I'm trying to show progress indication while running slow and unresponsive network jobs using client.batchList(batch_id).
I'm new to python but can dump the dict.items() (items_total, workitems_waiting, workitems_working, items_done, time_left, progress) - there must be an easier way to use this information in real time in a python loop as below?
log ("Match & Align starting: " + stat['status'])
while(stat['status'] == "inprogress" or stat['status'] == "working"):
melapsed = round(time.time() - mainstarttime)
pelapsed = round(time.time() - procstarttime)
batch = client.batchList(batch_id)
tell=len(batch)-1
log ("Match & Align (" + str(pelapsed) + " sec / " + str(melapsed) + " sec)")
PhotoScan.app.update()
time.sleep(60)
stat = client.batchStatus(batch_id)
This is not working for me:
batch = client.batchList()[0]
print(batch["task"]["progress"])
http://www.agisoft.com/forum/index.php?topic=5519.msg27057#msg27057