style: fix linting issues in retry and metadata extraction code
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
+7
-8
@@ -536,14 +536,13 @@ def _retry_pipeline_step(file_record: FileRecord, step_name: str, db: Session) -
|
||||
elif file_record.processed_file_path and os.path.exists(file_record.processed_file_path):
|
||||
# File has been processed and moved to processed directory
|
||||
file_path = file_record.processed_file_path
|
||||
else:
|
||||
# Try fallback path in workdir/tmp
|
||||
if file_record.local_filename:
|
||||
workdir = settings.workdir
|
||||
tmp_dir = os.path.join(workdir, "tmp")
|
||||
fallback_path = os.path.join(tmp_dir, os.path.basename(file_record.local_filename))
|
||||
if os.path.exists(fallback_path):
|
||||
file_path = fallback_path
|
||||
# Try fallback path in workdir/tmp
|
||||
elif file_record.local_filename:
|
||||
workdir = settings.workdir
|
||||
tmp_dir = os.path.join(workdir, "tmp")
|
||||
fallback_path = os.path.join(tmp_dir, os.path.basename(file_record.local_filename))
|
||||
if os.path.exists(fallback_path):
|
||||
file_path = fallback_path
|
||||
|
||||
if not file_path:
|
||||
raise HTTPException(
|
||||
|
||||
Reference in New Issue
Block a user