I execute the curl command through a subprocess. This curl command starts video processing on another server and waits for a response. Once the process is complete, the remote server will return a json object. I check the status of the subprocess using the poll () value, which is None - the process is not completed, 0 - the process completed successfully and 1- for an error.
I get the correct answer if the processing takes about 30 minutes / or less on the remote server, but if the processing takes longer, I get only "No", although I see that the remote server is complete and already returned the json object.
Can someone tell me what is the possible reason for the polling () returning only None after a certain time. Thank you in advance.
My Popen Object:
object = subprocess.Popen(str(curlCmd), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
and I call object.poll() every 2 seconds to check if the process completed successfully.
source share