Skip to content
Snippets Groups Projects
Commit cee5c375 authored by jkerdreu's avatar jkerdreu
Browse files

Fix overrun error in multicast queue

git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/trunk@2148 b32b6428-25c9-4566-ad07-03861ab6144f
parent 838c5443
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ class Device:
self.last_alive = int(time.time())
self.next_alive = 0
# Refresh rate
self.refresh = 0
self.refresh = now() - REFRESH_RATE + random.randint(0,20)
self.refresh_attributes = 0
self.refresh_description = 0
self.refresh_db = 0
......@@ -35,7 +35,7 @@ class Device:
def update_attributes(self, data):
""" rude update attributes. Return true if updated"""
self.refresh_attributes = now()
# really no the best comparaison, but we just need a flag
# really not the best comparaison, but we just need a flag
if self.attributes == data:
return False
self.attributes.update(data)
......@@ -199,7 +199,7 @@ class Monitor:
self.engine.add_rx_handler(self.parse_msg)
self.engine.add_timer(self.auto_wash, 10)
self.engine.add_timer(self.send_isalive, 240)
self.engine.add_timer(self.refresh_devices, 5)
self.engine.add_timer(self.refresh_devices, 2)
def parse_msg(self, msg):
# do nothing for some msg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment