Skip to content

Commit

Permalink
Fix build and error in health check (#43)
Browse files Browse the repository at this point in the history
* fix build

* fix health_check with new pyrogram version
  • Loading branch information
davtur19 authored Jan 6, 2024
1 parent 42fdf3d commit 626995d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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
FROM python:3.10

ENV PYTHONUNBUFFERED=1

Expand Down
4 changes: 2 additions & 2 deletions smart_tv_telegram/mtproto.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ async def get_message(self, message_id: int) -> Message:
return message

async def health_check(self):
if not all(x.is_connected.is_set() for x in self._client.media_sessions.values()):
if not all(x.is_started.is_set() for x in self._client.media_sessions.values()):
logging.log(logging.ERROR, "media session not connected")
raise ConnectionError()

if not self._client.session.is_connected.is_set():
if not self._client.session.is_started.is_set():
logging.log(logging.ERROR, "main session not connected")
raise ConnectionError()

Expand Down

0 comments on commit 626995d

Please sign in to comment.