You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while True:
try:
transactions_to_obp(login_data[0], login_data[1])
# TODO: Need another exception for not getting the CSV File.
# wait 10 minutes
sleep(10 * 60)
except KeyboardInterrupt:
obp_logger.critical("KeyboardInterrupt!")
obp_logger.critical("Caught Ctrl-C from user")
raise
except Exception, e:
# TODO: need a cleanup as well, just to be sure no sensitive data left on the disk.
obp_logger.error("Something went wrong")
obp_logger.error("Error is:\n%s" % e)
obp_logger.error("restart in 60 seconds")
print "%s:Something went wrong" % libs.import_helper.date_now_formatted()
print "%s:Error is:\n%s" % (libs.import_helper.date_now_formatted(), e)
# When something went wrong wait 1 minute.
sleep(60)
When an exception is caught, the selenium process created in transactions_to_obp is never shut down, which can result in the creation of more and more selenium processes if the exception occurs again on the next run of transactions_to_obp, eventually crashing the server. A finally clause that could shut selenium down seems like it would fix this.
The text was updated successfully, but these errors were encountered:
In main.py we have:
When an exception is caught, the selenium process created in transactions_to_obp is never shut down, which can result in the creation of more and more selenium processes if the exception occurs again on the next run of transactions_to_obp, eventually crashing the server. A finally clause that could shut selenium down seems like it would fix this.
The text was updated successfully, but these errors were encountered: