refactor(cleaner): batch query and controlled parallel order processing

This commit is contained in:
test
2026-03-16 21:47:13 +08:00
parent 9248be6310
commit 6a2fba0e57
8 changed files with 484 additions and 236 deletions

View File

@@ -12,7 +12,9 @@ export const CleanerInputSchema = z.object({
.array(z.string().min(1, 'Order number cannot be empty'))
.min(1, 'At least one order number is required'),
materialCodes: z.array(z.string().min(1, 'Material code cannot be empty')),
dryRun: z.boolean()
dryRun: z.boolean(),
queryBatchSize: z.number().int().min(1).max(100).optional().default(100),
processConcurrency: z.number().int().min(1).max(20).optional().default(1)
// Note: onProgress is a function, not validated via Zod
})