From 2f30b1ffd3ca25e60080df4cfe7fa2d4e4510ef8 Mon Sep 17 00:00:00 2001 From: Swann Date: Tue, 23 Jul 2019 18:44:17 +0200 Subject: [PATCH] feat: commenting --- replication.py | 3 ++- replication_client.py | 15 +++++++-------- test_replication.py | 1 + 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/replication.py b/replication.py index 9a9e97d..0cf383f 100644 --- a/replication.py +++ b/replication.py @@ -71,7 +71,7 @@ class ReplicatedDataFactory(object): class ReplicatedDatablock(object): """ - Datablock used for replication + Datablock definition used for replication """ uuid = None # uuid used as key (string) pointer = None # dcc data ref (DCC type) @@ -182,6 +182,7 @@ class ReplicatedDatablock(object): """ raise NotImplementedError + def __repr__(self): return "{uuid} - owner: {owner} - type: {type}".format( uuid=self.uuid, diff --git a/replication_client.py b/replication_client.py index 83018b3..f4728b3 100644 --- a/replication_client.py +++ b/replication_client.py @@ -67,13 +67,6 @@ class Client(object): else: raise TypeError("Type not supported") - - def pull(self,object=None): - """ - Asynchonous pull - Here we want to pull all waiting changes and apply them - """ - pass def unregister(self,object_uuid,clean=False): """ @@ -89,7 +82,13 @@ class Client(object): delete_command.push(self._net_client.publish) else: raise KeyError("Cannot unregister key") - + + def pull(self,object=None): + """ + Asynchonous pull + Here we want to pull all waiting changes and apply them + """ + pass class ClientNetService(threading.Thread): def __init__(self,store_reference=None, factory=None,id="default"): diff --git a/test_replication.py b/test_replication.py index cdcab47..9cbfe41 100644 --- a/test_replication.py +++ b/test_replication.py @@ -26,6 +26,7 @@ class RepSampleData(ReplicatedDatablock): return pickle.loads(data) + def dump(self): import json output = {}