chore: apply pending code updates

This commit is contained in:
2026-03-17 11:39:27 +01:00
parent e5fae0a0a2
commit 92bd55ada1
45 changed files with 2236 additions and 2130 deletions

View File

@@ -55,7 +55,8 @@ class RecoveryStrategies:
if attempt == max_retries - 1:
raise
logger.warning(
f"Network error on attempt {attempt + 1}, retrying..."
"Network error on attempt %d, retrying...",
attempt + 1,
)
continue
@@ -72,7 +73,8 @@ class RecoveryStrategies:
if attempt == max_retries - 1:
raise
logger.warning(
f"Download error on attempt {attempt + 1}, retrying..."
"Download error on attempt %d, retrying...",
attempt + 1,
)
continue
@@ -92,7 +94,7 @@ class FileCorruptionDetector:
# Video files should be at least 1MB
return file_size > 1024 * 1024
except Exception as e:
logger.error(f"Error checking file validity: {e}")
logger.error("Error checking file validity: %s", e)
return False
@@ -123,13 +125,18 @@ def with_error_recovery(
last_error = e
if attempt < max_retries - 1:
logger.warning(
f"Error in {context} (attempt {attempt + 1}/"
f"{max_retries}): {e}, retrying..."
"Error in %s (attempt %d/%d): %s, retrying...",
context,
attempt + 1,
max_retries,
e,
)
else:
logger.error(
f"Error in {context} failed after {max_retries} "
f"attempts: {e}"
"Error in %s failed after %d attempts: %s",
context,
max_retries,
e,
)
if last_error: