2023-04-13 14:25:02 +02:00
|
|
|
#!/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
|
2023-04-13 14:25:02 +02:00
|
|
|
|
|
|
|
sys.path.append(os.environ['AIL_BIN'])
|
|
|
|
##################################
|
|
|
|
# Import Project packages
|
|
|
|
##################################
|
2023-05-15 10:37:03 +02:00
|
|
|
from lib import ail_core
|
2023-04-13 14:25:02 +02:00
|
|
|
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()
|
2023-04-13 14:25:02 +02:00
|
|
|
|
|
|
|
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")
|