♻️ refactor: use generationBatchId as notification dedupeKey

This commit is contained in:
YuTengjing
2026-03-25 22:00:49 +08:00
parent 21a2e362c0
commit 09b7b1bdcd
4 changed files with 4 additions and 4 deletions

View File

@@ -203,9 +203,9 @@ export const POST = async (req: Request, { params }: { params: Promise<{ provide
});
notifyVideoCompleted({
generationBatchId: generation.generationBatchId!,
model: resolvedModel,
prompt: batch?.prompt ?? '',
taskId: asyncTask.id,
topicId: batch?.generationTopicId,
userId: asyncTask.userId,
}).catch((err) => console.error('[video-webhook] notification failed:', err));

View File

@@ -1,8 +1,8 @@
interface NotifyImageCompletedParams {
duration: number;
generationBatchId: string;
model: string;
prompt: string;
taskId: string;
topicId?: string;
userId: string;
}

View File

@@ -1,7 +1,7 @@
interface NotifyVideoCompletedParams {
generationBatchId: string;
model: string;
prompt: string;
taskId: string;
topicId?: string;
userId: string;
}

View File

@@ -345,9 +345,9 @@ export const imageRouter = router({
notifyImageCompleted({
duration,
generationBatchId,
model,
prompt: params.prompt,
taskId,
topicId: generationTopicId,
userId: ctx.userId,
}).catch((err) => console.error('[image-async] notification failed:', err));