mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-22 14:48:27 +00:00
feat(embedding): defer embedding workflow, use transcoded assets, and execute chunks in separate activities
This commit is contained in:
@@ -18,6 +18,7 @@ export async function transcodeMedia(task: WorkflowTask): Promise<void> {
|
||||
cleanupTmpDirActivity,
|
||||
takeScreenshotsActivity,
|
||||
overlayAnnotationsActivity,
|
||||
createEmbeddingTaskIfEnabledActivity,
|
||||
} = getActivities()
|
||||
|
||||
let tmpDir: string | undefined
|
||||
@@ -245,6 +246,13 @@ export async function transcodeMedia(task: WorkflowTask): Promise<void> {
|
||||
status: 'processed',
|
||||
})
|
||||
|
||||
// 11.5 Create AI embedding task if enabled
|
||||
await executeActivity(workerQueue, createEmbeddingTaskIfEnabledActivity, {
|
||||
assetId: asset.id,
|
||||
teamId: task.teamId,
|
||||
projectId: task.projectId,
|
||||
})
|
||||
|
||||
// 12. Update Task Status
|
||||
await executeActivity(workerQueue, updateTaskStatusActivity, {
|
||||
taskId: task.id,
|
||||
|
||||
Reference in New Issue
Block a user