I have a certain job in python called "exportjob" (this job basically execute a procedure in external application). I need that python wait the execution of the code until a variable assume a specific value. More precisely: a) the command for exportjob is:
exportJob = client.service.SubmitExportJob(USER, CLIENTID, PW, "MB_ExportSet_Portfolio", dt.date(2020, 4, 16), "Exporting Job", True)
b) then i get the status of this exportjob by using this command (simply passing him the exportjob variable in the command)
status = client.service.GetExportJobStatus(USER, CLIENTID, PW, exportJob)
c) the status variable return immediately only one of these values: status= 0 'Export completed succesfully', status<0 'Export failed', status>0 'Export is pending'
I want to tell python (if status>0) TO WAIT UNTIL status=0 (or stopping procedure if status<0) Someone can help me?