From 733ed8d83f924126a0f21692f6025396463b6f4f Mon Sep 17 00:00:00 2001 From: krau Date: Thu, 11 Jan 2024 10:30:08 +0800 Subject: [PATCH] update python --- Dockerfile | 2 +- kmua/common/bot.py | 7 +++---- pyproject.toml | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5bd14e..b35e27a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11.6-slim-bookworm +FROM python:3.11.7-slim-bookworm COPY . /kmua WORKDIR /kmua RUN apt-get update && apt-get install graphviz -y && pip install -r requirements.txt diff --git a/kmua/common/bot.py b/kmua/common/bot.py index 4c7a6e9..bf030b9 100644 --- a/kmua/common/bot.py +++ b/kmua/common/bot.py @@ -22,16 +22,15 @@ def get_bot_status() -> str: - Associations: {dao.get_all_associations_count()} """ if settings.get("db_url").startswith("sqlite"): - db_status += f""" - - Size: {_database_path.stat().st_size / 1024 / 1024:.2f} MB - """ + db_status += f"- Size: {_database_path.stat().st_size / 1024 / 1024:.2f} MB" + db_status += "\n" pid = os.getpid() p = psutil.Process(pid) process_status = f""" Process Status: - Memory: {p.memory_full_info().rss / 1024 / 1024:.2f} MB - Uptime: {(time.time() - p.create_time()) / 60 / 60:.2f} hours - - Python: {psutil.Process().exe()} + - Python: {platform.python_version()} """ system_status = f""" System Status: diff --git a/pyproject.toml b/pyproject.toml index aa6f079..7c773dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "kmua" -version = "2.2.0" -description = "" +version = "2.2.1" +description = "A Telegram Bot" authors = ["krau "] readme = "README.md" license = "MIT"