refactor: 抽离 AI pipeline 与调度共享能力逻辑

This commit is contained in:
fawney19
2026-04-10 01:46:14 +08:00
parent b901a6ffc7
commit 5014e2f5fd
255 changed files with 15057 additions and 3115 deletions

View File

@@ -253,7 +253,7 @@ async fn persist_cancelled_video_task(
next_poll_at_unix_secs: None,
poll_count: task.poll_count,
max_poll_count: task.max_poll_count,
created_at_unix_secs: task.created_at_unix_secs,
created_at_unix_ms: task.created_at_unix_ms,
submitted_at_unix_secs: task.submitted_at_unix_secs,
completed_at_unix_secs: Some(now_unix_secs),
updated_at_unix_secs: now_unix_secs,

View File

@@ -272,7 +272,7 @@ fn build_successful_poll_update(
record.resolution = task.resolution.clone();
record.aspect_ratio = task.aspect_ratio.clone();
record.size = task.size.clone();
record.created_at_unix_secs = task.created_at_unix_secs;
record.created_at_unix_ms = task.created_at_unix_ms;
record.submitted_at_unix_secs = task.submitted_at_unix_secs;
record.updated_at_unix_secs = now_unix_secs;
record.retry_count = task.retry_count;
@@ -379,7 +379,7 @@ fn stored_task_to_upsert(task: &StoredVideoTask) -> UpsertVideoTask {
next_poll_at_unix_secs: task.next_poll_at_unix_secs,
poll_count: task.poll_count,
max_poll_count: task.max_poll_count.max(1),
created_at_unix_secs: task.created_at_unix_secs,
created_at_unix_ms: task.created_at_unix_ms,
submitted_at_unix_secs: task.submitted_at_unix_secs,
completed_at_unix_secs: task.completed_at_unix_secs,
updated_at_unix_secs: task.updated_at_unix_secs,