diff --git a/database_caller.py b/database_caller.py index d103527..3612f69 100755 --- a/database_caller.py +++ b/database_caller.py @@ -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))