Skip to content

Commit

Permalink
some more review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelveldt committed Jun 26, 2023
1 parent cd6ff8e commit 1c16fc6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions matter_server/server/device_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ async def _subscribe_node(self, node_id: int) -> None:
# a very limited amount of concurrent subscriptions.
if sub := self._subscriptions.pop(node_id, None):
async with node_lock:
node_logger.debug("Unsubscribing from existing subscription.")
node_logger.info("Unsubscribing from existing subscription.")
await self._call_sdk(sub.Shutdown)

node = cast(MatterNodeData, self._nodes[node_id])
Expand Down Expand Up @@ -510,7 +510,7 @@ async def _subscribe_node(self, node_id: int) -> None:
# Wildcard endpoint, specific cluster
attr_subscriptions.append(cluster)

node_logger.info("Setting up attributes and events subscription.")
node_logger.debug("Setting up attributes and events subscription.")
if len(attr_subscriptions) > 50:
# prevent memory overload on node and fallback to wildcard sub if too many
# individual subscriptions
Expand Down Expand Up @@ -597,7 +597,7 @@ def event_callback(
) -> None:
# pylint: disable=unused-argument
assert self.server.loop is not None
node_logger.info(
node_logger.debug(
"Received node event: %s - transaction: %s", data, transaction
)
self.event_history.append(data)
Expand Down Expand Up @@ -675,8 +675,7 @@ async def _check_interview_and_subscription(

def reschedule():
"""(Re)Schedule interview and/or initial subscription for a node."""
loop = asyncio.get_event_loop()
loop.call_later(
self.server.loop.call_later(
reschedule_interval,
asyncio.create_task,
self._check_interview_and_subscription(
Expand Down

0 comments on commit 1c16fc6

Please sign in to comment.