Update database_caller.py
This commit is contained in:
parent
26a686abec
commit
1f1890022d
@ -1148,6 +1148,24 @@ if __name__ == '__main__':
|
||||
update_process.start()
|
||||
update_processes.append(update_process)
|
||||
|
||||
|
||||
# ipos
|
||||
ipo_time = datetime.strptime(last_updates['ipo']['time'], "%d/%m/%Y %H:%M:%S")
|
||||
|
||||
|
||||
NY_time = datetime.now(NY_zone).replace(tzinfo=None)
|
||||
diff = (NY_time - ipo_time).total_seconds()/60 #minutes
|
||||
|
||||
|
||||
if last_updates['ipo']['force'] or diff >= update_frequencies['ipo']:
|
||||
ipo_time = NY_time.strftime("%d/%m/%Y %H:%M:%S")
|
||||
last_updates['ipo']['time'] = ipo_time
|
||||
last_updates['ipo']['force'] = False
|
||||
update_process = Process(target = updateIpo, args = (ipo_key,logf))
|
||||
update_process.start()
|
||||
update_processes.append(update_process)
|
||||
|
||||
|
||||
# weather
|
||||
weather_time = datetime.strptime(last_updates['weather']['time'], "%d/%m/%Y %H:%M:%S")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user