It looks like you're new here. If you want to get involved, click one of these buttons!
##############Sample code##############
tries =3
for attempt in range(tries):
try:
#Call your function [ has a timeout of 1s]
except Exception as e:
print(e)
logging.info(e)
logging.info('Retrying....')
time.sleep(1) # here I can sleep for the stipulated time before I retry [ 3s, 10s ,etc]
continue
else:
break
else:
print('All retries have failed')
print('Program will stop')
print('Please handle manually')
raise SystemExit
#######################################
https://gist.github.com/TySkby/143190ad1b88c6115597c45f996b030c