mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 07:10:29 +08:00
[go] Merged memory extractor with ingestion task handler (#17730)
Routes async memory extraction through the shared ingestion NATS pipeline via task_type=memory, removing the dedicated Redis consumer. Memory failures ack terminally, transient errors nack for redelivery.
This commit is contained in:
@@ -559,6 +559,10 @@ func runIngestor(ctx context.Context, cancel context.CancelFunc, args *serverArg
|
||||
globalConfig.GetDefaultChatModel().Name,
|
||||
globalConfig.GetDefaultEmbeddingModel().Name,
|
||||
)
|
||||
// Memory extraction runs on the Ingestor's shared NATS consumer + worker
|
||||
// pool (task_type="memory" dispatched by processMessage -> executeMemoryTask),
|
||||
// so there is no longer a dedicated Redis memory consumer to start.
|
||||
ingestor.SetMemoryMessageService(service.NewMemoryMessageService(service.NewMemoryService()))
|
||||
|
||||
// Start returns immediately (it launches the owned consume/compile
|
||||
// goroutines and joins them via Stop); a provisioning failure here is
|
||||
@@ -567,13 +571,6 @@ func runIngestor(ctx context.Context, cancel context.CancelFunc, args *serverArg
|
||||
common.Error("Failed to initialize ingestor", err)
|
||||
}
|
||||
|
||||
// Memory extraction consumer: drains task_type="memory" messages
|
||||
// from the te.0.common Redis stream and runs LLM extraction.
|
||||
memoryConsumerCtx, stopMemoryConsumer := context.WithCancel(ctx)
|
||||
defer stopMemoryConsumer()
|
||||
memoryMessageSvc := service.NewMemoryMessageService(service.NewMemoryService())
|
||||
go memoryMessageSvc.StartTaskConsumer(memoryConsumerCtx)
|
||||
|
||||
common.Info("\n ____ __ _\n" +
|
||||
" / _/___ ____ ____ _____/ /_(_)___ ____ ________ ______ _____ _____\n" +
|
||||
" / // __ \\/ __ `/ _ \\/ ___/ __/ / __ \\/ __ \\ / ___/ _ \\/ ___/ | / / _ \\/ ___/\n" +
|
||||
|
||||
Reference in New Issue
Block a user