refactor: project architecture refactor, container splitting
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import sys
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from startup_banner import print_startup_banner
|
||||
|
||||
from app_logging import configure_logging
|
||||
from bot.main_bot import run_bot
|
||||
from config.settings import get_settings
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
settings = get_settings()
|
||||
await run_bot(settings, run_web=True, run_tariff_worker=False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
load_dotenv()
|
||||
print_startup_banner("backend")
|
||||
configure_logging()
|
||||
try:
|
||||
asyncio.run(main())
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
logging.info("Backend stopped")
|
||||
except Exception as exc:
|
||||
logging.critical("Backend failed: %s", exc, exc_info=True)
|
||||
sys.exit(1)
|
||||
Reference in New Issue
Block a user