altre fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from utils.database.loader_action import load_data, update_status
|
||||
from utils.database.loader_action import load_data, update_status, unlock
|
||||
from utils.database import DATA_LOADED
|
||||
from utils.csv.data_preparation import make_pipe_sep_matrix, make_ain_din_matrix, make_channels_matrix
|
||||
from utils.csv.data_preparation import make_pipe_sep_matrix, make_ain_din_matrix, make_channels_matrix, make_tlp_matrix, make_gd_matrix, make_musa_matrix
|
||||
|
||||
import logging
|
||||
|
||||
@@ -10,7 +10,10 @@ async def main_loader(cfg: object, id: int, pool, action: str) -> None:
|
||||
type_matrix_mapping = {
|
||||
"pipe_separator": make_pipe_sep_matrix,
|
||||
"analogic_digital": make_ain_din_matrix,
|
||||
"channels": make_channels_matrix
|
||||
"channels": make_channels_matrix,
|
||||
"tlp": make_tlp_matrix,
|
||||
"gd": make_gd_matrix,
|
||||
"musa": make_musa_matrix
|
||||
}
|
||||
if action in type_matrix_mapping:
|
||||
function_to_call = type_matrix_mapping[action]
|
||||
@@ -21,5 +24,6 @@ async def main_loader(cfg: object, id: int, pool, action: str) -> None:
|
||||
# Load the data into the database
|
||||
if await load_data(cfg, matrice_valori, pool):
|
||||
await update_status(cfg, id, DATA_LOADED, pool)
|
||||
await unlock(cfg, id, pool)
|
||||
else:
|
||||
logger.warning(f"Action '{action}' non riconosciuta.")
|
||||
|
||||
Reference in New Issue
Block a user