AIL-framework/bin/AIL_Init.py

33 lines
694 B
Python
Raw Normal View History

#!/usr/bin/env python3
# -*-coding:UTF-8 -*
"""
AIL Init
============================
Init DB + Clear Stats
"""
import os
import sys
2023-05-15 10:37:03 +02:00
import logging.config
sys.path.append(os.environ['AIL_BIN'])
##################################
# Import Project packages
##################################
2023-05-15 10:37:03 +02:00
from lib import ail_core
from lib import ail_queues
2023-05-15 10:37:03 +02:00
from lib import ail_logger
logging.config.dictConfig(ail_logger.get_config(name='modules'))
logger = logging.getLogger()
if __name__ == "__main__":
ail_queues.save_queue_digraph()
ail_queues.clear_modules_queues_stats()
2023-05-15 10:37:03 +02:00
# Send module state to logs
ail_uuid = ail_core.get_ail_uuid()
logger.warning(f"AIL {ail_uuid} started")