fix(dataset): CELERY_BROKER uses amqp rabbitmq. When adding document segments in batches and uploading large files, the status will always remain stuck at "In batch processing" #22709 (#23038)

This commit is contained in:
zhaobingshuang
2025-07-28 14:24:13 +08:00
committed by GitHub
parent 3f8fb18c89
commit 5c5f61b2aa
6 changed files with 166 additions and 44 deletions

View File

@@ -154,9 +154,9 @@ export const useUpdateChildSegment = () => {
export const useSegmentBatchImport = () => {
return useMutation({
mutationKey: [NAME_SPACE, 'batchImport'],
mutationFn: (payload: { url: string; body: FormData }) => {
mutationFn: (payload: { url: string; body: { upload_file_id: string } }) => {
const { url, body } = payload
return post<BatchImportResponse>(url, { body }, { bodyStringify: false, deleteContentType: true })
return post<BatchImportResponse>(url, { body })
},
})
}