feat(transcode): trigger ai metadata autofill post transcode

This commit is contained in:
yiling
2026-07-28 20:19:10 +08:00
parent d0d29b34ed
commit e51d86e8f0
11 changed files with 185 additions and 31 deletions
@@ -27,6 +27,7 @@ export async function transcodeVideoWorkflow(task: WorkflowTask): Promise<void>
updateAssetMediaActivity,
downloadMediaToTmpActivity,
createEmbeddingTaskIfEnabledActivity,
createAutofillTaskIfEnabledActivity,
} = getActivities()
await executeActivity(workerQueue, updateAssetStatusActivity, {
@@ -161,6 +162,12 @@ export async function transcodeVideoWorkflow(task: WorkflowTask): Promise<void>
projectId: task.projectId,
})
await executeActivity(workerQueue, createAutofillTaskIfEnabledActivity, {
assetId: asset.id,
teamId: task.teamId,
projectId: task.projectId,
})
await completeTask(workerQueue, task.id)
} catch (err) {
console.error(`transcodeVideoWorkflow failed for task ${task.id}:`, err)