mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-26 13:19:34 +07:00
♻️ refactor: use generationBatchId as notification dedupeKey
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
interface NotifyImageCompletedParams {
|
||||
duration: number;
|
||||
generationBatchId: string;
|
||||
model: string;
|
||||
prompt: string;
|
||||
taskId: string;
|
||||
topicId?: string;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
interface NotifyVideoCompletedParams {
|
||||
generationBatchId: string;
|
||||
model: string;
|
||||
prompt: string;
|
||||
taskId: string;
|
||||
topicId?: string;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user