File size: 851 Bytes
4ad5efa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from modules.data_management.unified_index_manager import UnifiedIndexManager

class DataProcessor:
    def __init__(self):
        # ... existing code ...
        self.index_manager = UnifiedIndexManager()
    
    def process_data(self, df, session_id):
        # ... existing code ...
        
        # Створюємо індекси
        indices_result = self.index_manager.get_or_create_indices(df, session_id)
        
        if "error" in indices_result:
            logger.error(f"Помилка при створенні індексів: {indices_result['error']}")
        else:
            logger.info(f"Індекси успішно створено: {indices_result['indices_dir']}")
            
        return {
            "success": True,
            "processed_data": df,
            "indices_info": indices_result
        }