work with stale stream removal - not working 100%
This commit is contained in:
parent
ed12a8effa
commit
e78912d557
@ -183,15 +183,14 @@ def rule_timer_loop():
|
|||||||
|
|
||||||
# run this every 10 seconds to trim orphaned stream ids
|
# run this every 10 seconds to trim orphaned stream ids
|
||||||
def stream_trimmer_loop():
|
def stream_trimmer_loop():
|
||||||
return
|
logger.debug('(ALL OPENBRIDGE SYSTEMS) Trimming orphaned stream IDs from system lists')
|
||||||
logger.info('(ALL OPENBRIDGE SYSTEMS) Trimming orphaned stream IDs from system lists')
|
|
||||||
_now = time()
|
_now = time()
|
||||||
|
|
||||||
for system in systems:
|
for system in systems:
|
||||||
remove_list = []
|
remove_list = []
|
||||||
if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
|
if CONFIG['SYSTEMS'][system]['MODE'] == 'OPENBRIDGE':
|
||||||
for stream_id in systems[system].STATUS:
|
for stream_id in systems[system].STATUS:
|
||||||
if systems[system].STATUS[stream_id]['LAST'] < _now + 1:
|
if systems[system].STATUS[stream_id]['LAST'] < _now + 5:
|
||||||
remove_list.append(stream_id)
|
remove_list.append(stream_id)
|
||||||
|
|
||||||
for stream in remove_list:
|
for stream in remove_list:
|
||||||
@ -761,6 +760,6 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# Initialize the stream trimmer
|
# Initialize the stream trimmer
|
||||||
stream_trimmer = task.LoopingCall(stream_trimmer_loop)
|
stream_trimmer = task.LoopingCall(stream_trimmer_loop)
|
||||||
stream_trimmer.start(10)
|
stream_trimmer.start(5)
|
||||||
|
|
||||||
reactor.run()
|
reactor.run()
|
Loading…
x
Reference in New Issue
Block a user