From 553ee380fe2971dd63299ec3404fd836e65b9a19 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 26 Nov 2015 12:16:09 +0100 Subject: [PATCH] only publish id to directroy once --- oml/nodes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oml/nodes.py b/oml/nodes.py index da0d0b3..36c3aed 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -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: