Updating linux actor

This commit is contained in:
Adolfo Gómez 2014-05-24 02:30:18 +00:00
parent 9bdfb4a7eb
commit c479fc3fbd
2 changed files with 26 additions and 23 deletions

View File

@ -53,15 +53,18 @@ class MyDaemon(Daemon):
info = net.getExternalIpAndMacs()
# We have "info" with know interfaces
while True:
newInfo = net.getExternalIpAndMacs()
for k in info.keys():
if info[k]['ip'] != newInfo[k]['ip']:
if Rpc.notifyIpChange() is not None:
info = newInfo
else:
logger.info('Could not notify IP address. Will retry later.')
break
time.sleep(5)
try:
newInfo = net.getExternalIpAndMacs()
for k in info.keys():
if info[k]['ip'] != newInfo[k]['ip']:
if Rpc.notifyIpChange() is not None:
info = newInfo
else:
logger.info('Could not notify IP address. Will retry later.')
break
time.sleep(5)
except:
logger.exception('Exception caught at main loop!')
return

View File

@ -6,7 +6,7 @@ timeout=5
[logging]
debug=DEBUG
debug=INFO
log=/var/log/udsactor.log
# Size in megas
maxsize=20