diff options
author | Aravinda VK <avishwan@redhat.com> | 2019-10-23 10:10:12 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-11-07 06:24:39 +0000 |
commit | 0fc68040b72fc94dec3874345547e294b9ec1f45 (patch) | |
tree | ea053550c79c3903804a7e3c3812551a41e17b01 /geo-replication/syncdaemon/py2py3.py | |
parent | 0ab6c178468b6cce095c54ab62cfa51162d01fcc (diff) |
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 <avishwan@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/py2py3.py')
-rw-r--r-- | geo-replication/syncdaemon/py2py3.py | 46 |
1 files changed, 23 insertions, 23 deletions
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 |