Use the cpu_rt support check also for rtprio (#2605)

This commit is contained in:
Pascal Vizeli 2021-02-22 14:02:36 +01:00 committed by GitHub
parent bb44ce5cd2
commit e2faf906de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -265,7 +265,7 @@ class DockerAddon(DockerInterface):
limits: List[docker.types.Ulimit] = []
# Need schedule functions
if self.addon.with_realtime:
if self.addon.with_realtime and self.sys_docker.info.support_cpu_realtime:
limits.append(docker.types.Ulimit(name="rtprio", soft=99))
# Return None if no capabilities is present

View File

@ -59,6 +59,8 @@ class DockerAudio(DockerInterface, CoreSysAttributes):
@property
def ulimits(self) -> List[docker.types.Ulimit]:
"""Generate ulimits for audio."""
if not self.sys_docker.info.support_cpu_realtime:
return None
return [docker.types.Ulimit(name="rtprio", soft=99)]
@property