Add job group execution limit option (#4457)

* Add job group execution limit option

* Fix pylint issues

* Assign variable before usage

* Cleanup jobs when done

* Remove isinstance check for performance

* Explicitly raise from None

* Add some more documentation info
This commit is contained in:
Mike Degatano
2023-08-08 16:49:17 -04:00
committed by GitHub
parent 71077fb0f7
commit 1611beccd1
25 changed files with 615 additions and 244 deletions

View File

@@ -9,7 +9,7 @@ import pytest
from supervisor.const import BusEvent, LogLevel
from supervisor.coresys import CoreSys
from supervisor.docker.const import ContainerState
from supervisor.docker.interface import DockerInterface
from supervisor.docker.dns import DockerDNS
from supervisor.docker.monitor import DockerContainerStateEvent
from supervisor.plugins.dns import HostEntry
from supervisor.resolution.const import ContextType, IssueType, SuggestionType
@@ -19,8 +19,8 @@ from supervisor.resolution.data import Issue, Suggestion
@pytest.fixture(name="docker_interface")
async def fixture_docker_interface() -> tuple[AsyncMock, AsyncMock]:
"""Mock docker interface methods."""
with patch.object(DockerInterface, "run") as run, patch.object(
DockerInterface, "restart"
with patch.object(DockerDNS, "run") as run, patch.object(
DockerDNS, "restart"
) as restart:
yield (run, restart)