fixed dtatbase caller bug

This commit is contained in:
Neythen Treloar 2022-02-28 20:57:46 +00:00
parent 6dfe5f13f8
commit cb9b4a6a08

View File

@ -631,7 +631,8 @@ if __name__ == '__main__':
#stocks
stock_time = datetime.strptime(last_updates['stocks'], "%d/%m/%Y %H:%M:%S")
stock_frequency = update_frequencies['stocks']
if checkStocks(stock_time, stock_frequency) or msg == 's':
diff = (NY_time - stock_time).total_seconds()/60 #minutes
if diff >= update_frequencies['stocks'] or msg == 's':
stock_time = NY_time.strftime("%d/%m/%Y %H:%M:%S")
last_updates['stocks'] = stock_time
#updateStocks(api_key)
@ -726,6 +727,7 @@ if __name__ == '__main__':
except Exception as e:
raise e
exc_type, exc_obj, exc_tb = sys.exc_info()
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
logf.write(str(e))