Is it possible to have a process running in the background doing http requests from within a python script added at startup;
I made the following to test if I could get an accessToken using a external command call, which works perfectly.
def signin():
print("Testing");
print(os.getcwd());
#call(["C:/Users/pksorensen/AppData/Local/Agisoft/PhotoScan Pro/scripts/S-Innovations.DevOpt.OpenIdConnect.exe"])
process = subprocess.Popen(["C:/Users/pksorensen/AppData/Local/Agisoft/PhotoScan Pro/scripts/S-Innovations.DevOpt.OpenIdConnect.exe"], stdout=subprocess.PIPE)
accessToken = process.communicate()[0]
print(accessToken)
PhotoScan.app.addMenuItem("AscendXYZ/Sign in", signin)
I would like to spawn a loop that every 5 mins checks for jobs using a HTTP endpoint. Is this possible, or would the user have to click a button everytime it should check?