only publish id to directroy once

This commit is contained in:
j 2015-11-26 12:16:09 +01:00
parent 66966570de
commit 553ee380fe

View file

@ -453,11 +453,13 @@ def update_online():
'id': settings.USER_ID,
'online': state.online
})
if state.online:
if not settings.server.get('migrated_id', False):
r = directory.put(settings.sk, {
'id': settings.USER_ID,
})
logger.debug('push id to directory %s', r)
if r:
settings.server['migrated_id'] = True
def check_nodes():
if state.online: