Files
ASE/utils/parsers/d2w_d2w.py
2025-05-11 16:40:46 +02:00

15 lines
539 B
Python

#!.venv/bin/python
# Import necessary modules
from utils.database.loader_action import load_data, update_status, DATA_LOADED
from utils.parsers.data_preparation import make_matrix
import logging
logger = logging.getLogger(__name__)
# Define the main function for loading data
async def main_loader(cfg: object, id: int) -> None:
# Create a matrix of values from the data
matrice_valori = make_matrix(cfg, id)
# Load the data into the database
if load_data(cfg, matrice_valori):
update_status(cfg, id, DATA_LOADED)