23 lines
518 B
Python
23 lines
518 B
Python
"""Production WSGI entry point and Controller service lifecycle owner."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import atexit
|
|
import logging
|
|
|
|
from app import create_app
|
|
from controller.config import load_config
|
|
from controller.service import ControllerService
|
|
|
|
|
|
logging.basicConfig(
|
|
level=logging.INFO,
|
|
format="%(asctime)s %(levelname)s %(name)s: %(message)s",
|
|
)
|
|
|
|
config = load_config()
|
|
service = ControllerService(config)
|
|
application = create_app(config, service)
|
|
service.start()
|
|
atexit.register(service.stop)
|