From 0fc68040b72fc94dec3874345547e294b9ec1f45 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Wed, 23 Oct 2019 10:10:12 +0530 Subject: georep: Merge Worker and Agent as a single process - libgfchangelog is simplified by removing unnecessary API Class - Merged Agent logic into Worker instead of running Worker and Agent as two separate processes and maintaining RPC between Worker and Agent. - Geo-rep command Pause and Resume will continue without any changes. But Agent functionality also gets paused with that. Updates: #755 Change-Id: Ie2c00fa7dddf21f180f0649e0aaf084d29023c98 Signed-off-by: Aravinda VK --- geo-replication/syncdaemon/py2py3.py | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'geo-replication/syncdaemon/py2py3.py') diff --git a/geo-replication/syncdaemon/py2py3.py b/geo-replication/syncdaemon/py2py3.py index faad750059c..f9c76e1b50a 100644 --- a/geo-replication/syncdaemon/py2py3.py +++ b/geo-replication/syncdaemon/py2py3.py @@ -55,23 +55,23 @@ if sys.version_info >= (3,): def gr_lremovexattr(cls, path, attr): return cls.libc.lremovexattr(path.encode(), attr.encode()) - def gr_cl_register(cls, brick, path, log_file, log_level, retries): - return cls._get_api('gf_changelog_register')(brick.encode(), - path.encode(), - log_file.encode(), - log_level, retries) + def gr_cl_register(libgfapi, brick, path, log_file, log_level, retries): + return libgfapi.gf_changelog_register(brick.encode(), + path.encode(), + log_file.encode(), + log_level, retries) - def gr_cl_done(cls, clfile): - return cls._get_api('gf_changelog_done')(clfile.encode()) + def gr_cl_done(libgfapi, clfile): + return libgfapi.gf_changelog_done(clfile.encode()) - def gr_cl_history_changelog(cls, changelog_path, start, end, num_parallel, + def gr_cl_history_changelog(libgfapi, changelog_path, start, end, num_parallel, actual_end): - return cls._get_api('gf_history_changelog')(changelog_path.encode(), - start, end, num_parallel, - actual_end) + return libgfapi.gf_history_changelog(changelog_path.encode(), + start, end, num_parallel, + actual_end) - def gr_cl_history_done(cls, clfile): - return cls._get_api('gf_history_changelog_done')(clfile.encode()) + def gr_cl_history_done(libgfapi, clfile): + return libgfapi.gf_history_changelog_done(clfile.encode()) # regular file @@ -137,20 +137,20 @@ else: def gr_lremovexattr(cls, path, attr): return cls.libc.lremovexattr(path, attr) - def gr_cl_register(cls, brick, path, log_file, log_level, retries): - return cls._get_api('gf_changelog_register')(brick, path, log_file, - log_level, retries) + def gr_cl_register(libgfapi, brick, path, log_file, log_level, retries): + return libgfapi.gf_changelog_register(brick, path, log_file, + log_level, retries) - def gr_cl_done(cls, clfile): - return cls._get_api('gf_changelog_done')(clfile) + def gr_cl_done(libgfapi, clfile): + return libgfapi.gf_changelog_done(clfile) - def gr_cl_history_changelog(cls, changelog_path, start, end, num_parallel, + def gr_cl_history_changelog(libgfapi, changelog_path, start, end, num_parallel, actual_end): - return cls._get_api('gf_history_changelog')(changelog_path, start, end, - num_parallel, actual_end) + return libgfapi.gf_history_changelog(changelog_path, start, end, + num_parallel, actual_end) - def gr_cl_history_done(cls, clfile): - return cls._get_api('gf_history_changelog_done')(clfile) + def gr_cl_history_done(libgfapi, clfile): + return libgfapi.gf_history_changelog_done(clfile) # regular file -- cgit