1
This commit is contained in:
@@ -532,9 +532,9 @@ async def _download_generation_result(self, task_id: str) -> dict[str, Any]:
|
||||
from app.services.video_upscale.media_service import probe_video
|
||||
source_info = await probe_video(abs_path)
|
||||
if source_info:
|
||||
task.source_width = source_info.width
|
||||
task.source_height = source_info.height
|
||||
task.source_duration_seconds = round(source_info.duration_seconds, 2)
|
||||
source_width = source_info.width
|
||||
source_height = source_info.height
|
||||
source_duration = round(source_info.duration_seconds, 2)
|
||||
except Exception as exc:
|
||||
logger.warning("Failed to probe video info: %s", exc)
|
||||
|
||||
@@ -546,6 +546,9 @@ async def _download_generation_result(self, task_id: str) -> dict[str, Any]:
|
||||
db=db,
|
||||
api_task=task,
|
||||
source_local_path=dest_path,
|
||||
source_width=source_width,
|
||||
source_height=source_height,
|
||||
source_duration=source_duration,
|
||||
)
|
||||
|
||||
# 如果已存在超分任务(重复调用),检查超分状态
|
||||
@@ -585,13 +588,13 @@ async def _download_generation_result(self, task_id: str) -> dict[str, Any]:
|
||||
if processor_key in ("local_ffmpeg_crop_v1",):
|
||||
api_upscale_execute_local_simple.apply_async(
|
||||
args=[upscale_task.id],
|
||||
queue="gen_api_upscale",
|
||||
queue=CeleryQueue.GEN_API_UPSCALE.value,
|
||||
)
|
||||
else:
|
||||
# 远程超分(火山 MediaKit)
|
||||
api_upscale_submit_remote_simple.apply_async(
|
||||
args=[upscale_task.id],
|
||||
queue="gen_api_upscale",
|
||||
queue=CeleryQueue.GEN_API_UPSCALE.value,
|
||||
)
|
||||
await db.commit()
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ def api_upscale_submit_remote_simple(self, upscale_task_id: str) -> dict[str, An
|
||||
api_upscale_poll_remote_simple.apply_async(
|
||||
args=[upscale_task_id],
|
||||
countdown=30,
|
||||
queue="gen_api_upscale",
|
||||
queue=CeleryQueue.GEN_API_UPSCALE.value,
|
||||
)
|
||||
|
||||
return {"status": "submitted", "provider_task_id": submit_result.task_id}
|
||||
@@ -350,7 +350,7 @@ def api_upscale_poll_remote_simple(self, upscale_task_id: str) -> dict[str, Any]
|
||||
api_upscale_poll_remote_simple.apply_async(
|
||||
args=[upscale_task_id],
|
||||
countdown=30,
|
||||
queue="gen_api_upscale",
|
||||
queue=CeleryQueue.GEN_API_UPSCALE.value,
|
||||
)
|
||||
return {"status": "polling"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user