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
@@ -23,6 +23,7 @@ export async function transcodeImageWorkflow(task: WorkflowTask): Promise<void>
updateAssetMediaActivity,
downloadMediaToTmpActivity,
createEmbeddingTaskIfEnabledActivity,
createAutofillTaskIfEnabledActivity,
} = getActivities()
await executeActivity(workerQueue, updateAssetStatusActivity, {
@@ -96,6 +97,12 @@ export async function transcodeImageWorkflow(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(`transcodeImageWorkflow failed for task ${task.id}:`, err)