def find_best_offset(self, files):
offsets = {}
for file in files:
+ log = file + '.log'
others = files.copy()
others.remove(file)
offsets[file] = {}
offset = self.get_offset(file, other)
offsets[file]['offsets'][other] = offset
offsets[file]['offsets_sum'] += offset
+ self.touch(log)
# print(offsets)
min_offset = sorted(offsets.items(), key=lambda x: x[1]['offsets_sum'])[0]
for dir in dirs:
path = root + os.sep + dir
print(path)
+ is_processed = self.is_processed(path)
dir_files = os.listdir(path)
source_files = []
for file in dir_files:
if source_files:
offsets = {}
- is_processed = self.is_processed(source_files)
-
if len(source_files) > 1 and self.auto_offset_mode and (not is_processed or self.force_mode):
date_file = datetime.datetime.fromtimestamp(os.path.getmtime(source_files[0]))
if date_file >= self.date_limit and self.date_filter: