refactor(ai-moderation): unify worker pool entry points with discriminated union routing

This commit is contained in:
MythEclipse committed 2026-06-04 17:39:40 +07:00
1 parent 686dc2de4f
commit 4996acfacf
2 files changed
+138 -176

No files matched your search

@@ -412,7 +412,7 @@ async function processIndividualFallback(
);
const simpleResult = await workerPool.run({
type: "individual_simple",
type: "individual",
message,
skipNormalAnalysis: true,
} as any) as
@@ -654,6 +654,7 @@ async function processBatch(
conversationProcessing.set(conversationKey, processingStartedAt);
try {
const result = (await workerPool.run({
type: "batch",
conversationKey,
messages,
})) as AnalysisWorkerResponse;