Skip to content

Commit 99eedef

Browse files
wip
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent efca4b0 commit 99eedef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

core/services/service_manager/service_manager/cgroup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""cgroup v2 controller for resource limits and metrics."""
2+
# pylint: disable=too-many-instance-attributes
23

34
from __future__ import annotations
45

@@ -147,7 +148,7 @@ async def destroy(self, name: str) -> None:
147148
except OSError as e:
148149
log.warning(f"Cannot remove cgroup {path}: {e}")
149150

150-
# pylint: disable=too-many-branches
151+
# pylint: disable=too-many-branches,too-many-statements
151152
async def read_metrics(self, name: str) -> CgroupMetrics | None:
152153
"""Read current metrics from a service's cgroup."""
153154
path = self._cgroup_path(name)

core/services/service_manager/service_manager/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Metrics sampler - periodic collection of service metrics."""
2-
# pylint: disable=global-statement,too-many-instance-attributes,too-many-locals
2+
# pylint: disable=global-statement,too-many-instance-attributes,too-many-locals,too-many-branches,too-many-statements
33

44
from __future__ import annotations
55

@@ -166,7 +166,7 @@ def _read_net_stats(self, pid: int | None) -> tuple[int, int]:
166166
rx_total = 0
167167
tx_total = 0
168168
try:
169-
content = net_path.read_text()
169+
content = net_path.read_text(encoding="utf-8")
170170
for line in content.splitlines()[2:]: # Skip header lines
171171
parts = line.split()
172172
if len(parts) < 10:

0 commit comments

Comments
 (0)