fix: 修复HTTP协议视频下载完成后状态未更新的问题
- 在HTTP协议处理中添加volume_cache_path设置
- 确保下载成功后状态正确更新为ready
- 添加process_span.set_status("success")标记成功状态
修复问题:
- 文件下载完成但status仍为downloading
- local_exists为true但local_available为false
- 状态更新逻辑因缺少volume_cache_path而失效
This commit is contained in:
parent
904f93a74d
commit
4479544c18
|
|
@ -193,6 +193,8 @@ with downloader_image.imports():
|
||||||
cache_filepath = f"{config.S3_mount_dir}/{media.cache_filepath}"
|
cache_filepath = f"{config.S3_mount_dir}/{media.cache_filepath}"
|
||||||
os.makedirs(os.path.dirname(cache_filepath), exist_ok=True)
|
os.makedirs(os.path.dirname(cache_filepath), exist_ok=True)
|
||||||
download_large_file(url=media.__str__(), output_path=cache_filepath)
|
download_large_file(url=media.__str__(), output_path=cache_filepath)
|
||||||
|
volume_cache_path = cache_filepath # 设置volume_cache_path用于状态更新
|
||||||
|
process_span.set_status("success")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception(e)
|
logger.exception(e)
|
||||||
media.status = MediaCacheStatus.failed
|
media.status = MediaCacheStatus.failed
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue