Refactor connector service initialization to use LangflowConnectorService

This commit updates the service initialization in main.py to replace the existing ConnectorService with LangflowConnectorService. This change enhances the management of connector documents by leveraging the new service's capabilities, aligning with the ongoing improvements in asynchronous processing and code maintainability.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-09-08 16:42:07 -03:00
parent beee47068c
commit 6d0a94e4b4

View file

@ -1,6 +1,7 @@
import sys
# Configure structured logging early
from connectors.langflow_connector_service import LangflowConnectorService
from utils.logging_config import configure_from_env, get_logger
configure_from_env()
@ -49,7 +50,6 @@ from config.settings import (
)
# Existing services
from connectors.service import ConnectorService
from services.auth_service import AuthService
from services.chat_service import ChatService
@ -301,11 +301,7 @@ async def initialize_services():
document_service.process_pool = process_pool
# Initialize connector service
connector_service = ConnectorService(
patched_async_client=clients.patched_async_client,
process_pool=process_pool,
embed_model="text-embedding-3-small",
index_name=INDEX_NAME,
connector_service = LangflowConnectorService(
task_service=task_service,
session_manager=session_manager,
)