diff --git a/replication_client.py b/replication_client.py index d0207c6..dd68e34 100644 --- a/replication_client.py +++ b/replication_client.py @@ -94,6 +94,8 @@ class Client(object): """ pass + def get(self, object_uuid): + pass class ClientNetService(threading.Thread): def __init__(self, store_reference=None, factory=None): @@ -162,18 +164,21 @@ class ClientNetService(threading.Thread): """ items = dict(poller.poll(1)) + # COMMANDS if self.command in items: - if self.state == STATE_SYNCING: - datablock = ReplicatedDatablock.pull( + datablock = ReplicatedDatablock.pull( self.command, self._factory) - + + if self.state == STATE_SYNCING: if 'SNAPSHOT_END' in datablock.buffer: self.state = STATE_ACTIVE logger.debug('{} : snapshot done'.format(self._id)) else: datablock.store(self._store_reference) - # We receive updates from the server ! + + + # DATA if self.subscriber in items: if self.state == STATE_ACTIVE: logger.debug( diff --git a/test_replication.py b/test_replication.py index 1fbc614..f3585dd 100644 --- a/test_replication.py +++ b/test_replication.py @@ -13,8 +13,6 @@ from replication import ReplicatedDatablock, ReplicatedDataFactory from replication_client import Client, Server - - class SampleData(): def __init__(self, map={"sample": "data"}): self.map = map