loc ok
This commit is contained in:
@@ -10,7 +10,7 @@ import os
|
||||
# Import custom modules for configuration and database connection
|
||||
from utils.config import loader_load_data as setting
|
||||
from utils.database.connection import connetti_db
|
||||
from utils.database.loader_action import CSV_RECEIVED
|
||||
from utils.database import CSV_RECEIVED
|
||||
|
||||
# Initialize the logger for this module
|
||||
logger = logging.getLogger()
|
||||
@@ -49,7 +49,7 @@ async def worker(worker_id: int, queue: asyncio.Queue, cfg: object) -> None:
|
||||
await asyncio.sleep(CSV_PROCESSING_DELAY)
|
||||
else:
|
||||
logger.debug(f"Worker {worker_id} - Elaborazione completata correttamente")
|
||||
await asyncio.sleep(CSV_PROCESSING_DELAY*worker_id)
|
||||
await asyncio.sleep(CSV_PROCESSING_DELAY)
|
||||
|
||||
# Segnala che il lavoro è completato
|
||||
queue.task_done()
|
||||
@@ -107,9 +107,8 @@ async def load_csv(cfg: object) -> tuple:
|
||||
logger.debug(f"Caricamento dinamico del modulo: {module_name}")
|
||||
modulo = importlib.import_module(module_name)
|
||||
logger.debug(f"Funzione 'main_loader' caricata dal modulo {module_name}")
|
||||
return True, True
|
||||
except (ImportError, AttributeError) as e:
|
||||
logger.error(f"Errore nel caricamento del modulo {module_name}: {e}", exc_info=debug_mode)
|
||||
logger.warning(f"Modulo {module_name} non trovato: {e}", exc_info=debug_mode)
|
||||
|
||||
if not modulo:
|
||||
logger.error(f"Nessun modulo trovato {module_names}")
|
||||
|
||||
Reference in New Issue
Block a user