Skip to content

Commit 49c14b6

Browse files
authored
Merge pull request #327 from dvd-dev/gql_ka
Remove unnecessary keepalive logging
2 parents f7d225b + a02b754 commit 49c14b6

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pyhilo/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
LOG: Final = logging.getLogger(__package__)
88
DEFAULT_STATE_FILE: Final = "hilo_state.yaml"
99
REQUEST_RETRY: Final = 9
10-
PYHILO_VERSION: Final = "2025.9.01"
10+
PYHILO_VERSION: Final = "2025.10.01"
1111
# TODO: Find a way to keep previous line in sync with pyproject.toml automatically
1212

1313
CONTENT_TYPE_FORM: Final = "application/x-www-form-urlencoded"

pyhilo/graphql.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import asyncio
2+
import logging
23
from typing import Any, Dict, List, Optional
34

45
from gql import Client, gql
@@ -548,6 +549,9 @@ async def subscribe_to_device_updated(
548549
self, location_hilo_id: str, callback: callable = None
549550
) -> None:
550551
LOG.debug("subscribe_to_device_updated called")
552+
553+
# Setting log level to suppress keepalive messages on gql transport
554+
logging.getLogger("gql.transport.websockets").setLevel(logging.WARNING)
551555
while True: # Loop to reconnect if the connection is lost
552556
LOG.debug("subscribe_to_device_updated while true")
553557
access_token = await self._get_access_token()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exclude = ".venv/.*"
4040

4141
[tool.poetry]
4242
name = "python-hilo"
43-
version = "2025.9.1"
43+
version = "2025.10.1"
4444
description = "A Python3, async interface to the Hilo API"
4545
readme = "README.md"
4646
authors = ["David Vallee Delisle <[email protected]>"]

0 commit comments

Comments
 (0)