From 5a2cdb7bd6a826fc5c71e53a28352254ae53936a Mon Sep 17 00:00:00 2001 From: Fallen_Breath Date: Tue, 22 Oct 2024 23:11:57 +0800 Subject: [PATCH] CreateFileAction _BlobFileChanged log message tweak --- prime_backup/action/create_backup_action.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prime_backup/action/create_backup_action.py b/prime_backup/action/create_backup_action.py index 13525ec..ecd4a33 100644 --- a/prime_backup/action/create_backup_action.py +++ b/prime_backup/action/create_backup_action.py @@ -480,7 +480,7 @@ def bp_rba(h: str) -> Path: retry_cnt = i + 1 # [1, n] is_last_attempt = retry_cnt == _BLOB_FILE_CHANGED_RETRY_COUNT if i > 0: - self.logger.warning('Try to create blob {} (attempt {} / {})'.format(src_path_str, retry_cnt, _BLOB_FILE_CHANGED_RETRY_COUNT)) + self.logger.debug('Try to create blob {} (attempt {} / {})'.format(src_path_str, retry_cnt, _BLOB_FILE_CHANGED_RETRY_COUNT)) gen = attempt_once(last_chance=is_last_attempt) try: query = gen.send(None) @@ -493,8 +493,8 @@ def bp_rba(h: str) -> Path: self.__blob_by_hash_cache[blob.hash] = blob return blob, st except _BlobFileChanged: - next_action = 'no more retry' if is_last_attempt else 'retrying' - self.logger.warning('Blob {} stat has changed, {} (attempt {} / {})'.format(src_path_str, next_action, retry_cnt, _BLOB_FILE_CHANGED_RETRY_COUNT)) + next_action = 'No more retry' if is_last_attempt else 'Retrying' + self.logger.warning('Blob {} stat has changed, has someone modified it? {} (attempt {} / {})'.format(src_path_str, next_action, retry_cnt, _BLOB_FILE_CHANGED_RETRY_COUNT)) st = src_path.lstat() except Exception as e: self.logger.error('Create blob for file {} failed (attempt {} / {}): {}'.format(src_path_str, e, retry_cnt, _BLOB_FILE_CHANGED_RETRY_COUNT))