Skip to content

Commit

Permalink
systemd: CPUUsageNSec may not be set with systemd v256
Browse files Browse the repository at this point in the history
  • Loading branch information
lilydjwg committed Jun 21, 2024
1 parent 6d02d31 commit cca0541
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lilac2/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ def poll_rusage(name: str, deadline: float) -> tuple[RUsage, bool]:
for l in out.splitlines():
k, v = l.split('=', 1)
if k == 'CPUUsageNSec':
nsec = int(v)
try:
nsec = int(v)
except ValueError:
# [not set]
pass

finally:
logger.debug('stopping worker service')
Expand Down

0 comments on commit cca0541

Please sign in to comment.