diff --git a/agkyra/agkyra/syncer/localfs_client.py b/agkyra/agkyra/syncer/localfs_client.py index d6d8528d9105831e5f68287155e1f2c7d3b05868..38b54b792797dd36735f9976b9d8bc80e0fb6ddc 100644 --- a/agkyra/agkyra/syncer/localfs_client.py +++ b/agkyra/agkyra/syncer/localfs_client.py @@ -167,17 +167,6 @@ def path_status(path): return LOCAL_MISSING -def old_path_status(path): - try: - contents = os.listdir(path) - return LOCAL_NONEMPTY_DIR if contents else LOCAL_EMPTY_DIR - except OSError as e: - if e.errno == OS_NOT_A_DIR: - return LOCAL_FILE - if e.errno == OS_NO_FILE_OR_DIR: - return LOCAL_MISSING - - def is_info_eq(info1, info2): if {} in [info1, info2]: return info1 == info2 @@ -382,14 +371,6 @@ class LocalfsSourceHandle(object): raise common.ConflictError("'%s' is non-empty" % fspath) logger.info("Staging file '%s' to '%s'" % (self.objname, stage_path)) - def check_stable(self, interval=1, times=5): - for i in range(times): - live_info = local_path_changes(self.staged_file, self.source_state) - if live_info is not None: - return False - time.sleep(interval) - return True - def __init__(self, settings, source_state): self.SIGNATURE = "LocalfsSourceHandle" self.rootpath = settings.local_root_path @@ -407,7 +388,6 @@ class LocalfsSourceHandle(object): self.check_log() if not self.isdir: self.lock_file(self.fspath) - # self.check_stable() def check_log(self): with self.heartbeat.lock() as hb: diff --git a/agkyra/agkyra/syncer/pithos_client.py b/agkyra/agkyra/syncer/pithos_client.py index 00f14bc168250d1e94804c727d717de700be8f5f..f6a834c12c160d1d6909a81fb3c5ba9d57a0fb8c 100644 --- a/agkyra/agkyra/syncer/pithos_client.py +++ b/agkyra/agkyra/syncer/pithos_client.py @@ -289,15 +289,6 @@ class PithosFileClient(FileClient): poll.daemon = True poll.start() - def get_object_from_cache(self, objname): - if self.objects is None: - self.objects = self.endpoint.list_objects() - objs = [o for o in self.objects if o["name"] == objname] - try: - return objs[0] - except IndexError: - return None - def get_object(self, objname): try: return self.endpoint.get_object_info(objname)