store annotations in db and sync with peers
This commit is contained in:
parent
131a6a3215
commit
e0cba14d6a
21 changed files with 385 additions and 63 deletions
|
|
@ -124,9 +124,12 @@ class Node(Thread):
|
|||
self.local = None
|
||||
self.port = 9851
|
||||
|
||||
def is_local(self):
|
||||
return self._nodes and self.user_id in self._nodes.local
|
||||
|
||||
def get_local(self):
|
||||
if self._nodes and self._nodes.local:
|
||||
return self._nodes.local.get(self.user_id)
|
||||
return self._nodes.local.get_data(self.user_id)
|
||||
return None
|
||||
|
||||
def request(self, action, *args):
|
||||
|
|
@ -216,7 +219,7 @@ class Node(Thread):
|
|||
return False
|
||||
|
||||
def is_online(self):
|
||||
return self.online or self.get_local() is not None
|
||||
return self.online or self.is_local()
|
||||
|
||||
def send_response(self):
|
||||
self._q.put('send_response')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue