Skip to content

Commit

Permalink
update python
Browse files Browse the repository at this point in the history
  • Loading branch information
krau committed Jan 11, 2024
1 parent 0da550e commit 733ed8d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 3 additions & 4 deletions kmua/common/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "kmua"
version = "2.2.0"
description = ""
version = "2.2.1"
description = "A Telegram Bot"
authors = ["krau <[email protected]>"]
readme = "README.md"
license = "MIT"
Expand Down

0 comments on commit 733ed8d

Please sign in to comment.