Update database_caller.py
This commit is contained in:
parent
3664fd2c33
commit
03b5ace715
@ -524,7 +524,7 @@ def updateSports(api_key, logf):
|
||||
def checkStocks(last_update, update_frequency):
|
||||
NY_time = datetime.now(NY_zone).replace(tzinfo=None)
|
||||
opening = NY_time.replace(hour=9, minute=30, second=0, microsecond=0).replace(tzinfo=None)
|
||||
closing = NY_time.replace(hour=16, minute=0, second=0, microsecond=0).replace(tzinfo=None)
|
||||
closing = NY_time.replace(hour=16, minute=5, second=0, microsecond=0).replace(tzinfo=None)
|
||||
|
||||
|
||||
f = open('csv/stocks_settings.json', 'r')
|
||||
@ -664,7 +664,7 @@ if __name__ == '__main__':
|
||||
|
||||
NY_time = datetime.now(NY_zone).replace(tzinfo=None)
|
||||
opening = NY_time.replace(hour=9, minute=30, second=0, microsecond=0).replace(tzinfo=None)
|
||||
closing = NY_time.replace(hour=16, minute=0, second=0, microsecond=0).replace(tzinfo=None)
|
||||
closing = NY_time.replace(hour=16, minute=5, second=0, microsecond=0).replace(tzinfo=None)
|
||||
stock_open = opening < NY_time < closing and datetime.today().weekday() <= 4
|
||||
|
||||
if last_updates['stocks']['force'] or (diff >= update_frequencies['stocks'] and stock_open):# or msg == 's':
|
||||
|
Loading…
Reference in New Issue
Block a user