feat: 视频计费增强与影子计费系统

This commit is contained in:
fawney19
2026-02-03 18:48:39 +08:00
parent ed68aebfb0
commit 00442c41fa
84 changed files with 6507 additions and 1678 deletions

View File

@@ -255,6 +255,8 @@ class VideoTaskPollerAdapter:
task.progress_percent = 100
if result.video_urls:
task.video_urls = result.video_urls
if result.video_duration_seconds is not None:
task.video_duration_seconds = result.video_duration_seconds
self._attach_poll_raw_response(task, result)
elif result.status == VideoStatus.FAILED:
task.status = VideoStatus.FAILED.value
@@ -376,6 +378,8 @@ class VideoTaskPollerAdapter:
task.progress_percent = 100
if result.video_urls:
task.video_urls = result.video_urls
if result.video_duration_seconds is not None:
task.video_duration_seconds = result.video_duration_seconds
self._attach_poll_raw_response(task, result)
elif result.status == VideoStatus.FAILED:
task.status = VideoStatus.FAILED.value

View File

@@ -1041,8 +1041,10 @@ class TaskService:
)
continue
# 2. master switch
if not config.format_conversion_enabled:
# 2. global switch (from database config)
from src.services.system.config import SystemConfigService
if not SystemConfigService.is_format_conversion_enabled(self.db):
skip_reason = "format_conversion_disabled"
candidate_info.update(
{