Job conditions take a list (#3949)

This commit is contained in:
Joakim Sørensen 2022-10-13 15:59:06 +02:00 committed by GitHub
parent 9da4ea20a9
commit 1f7c067c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ class NetworkManager(CoreSysAttributes):
self.sys_dbus.network.interfaces[inet_name] self.sys_dbus.network.interfaces[inet_name]
) )
@Job(conditions=JobCondition.HOST_NETWORK) @Job(conditions=[JobCondition.HOST_NETWORK])
async def load(self): async def load(self):
"""Load network information and reapply defaults over dbus.""" """Load network information and reapply defaults over dbus."""
# Apply current settings on each interface so OS can update any out of date defaults # Apply current settings on each interface so OS can update any out of date defaults

View File

@ -422,7 +422,7 @@ async def test_supervisor_updated(coresys: CoreSys):
"""Initialize the test class.""" """Initialize the test class."""
self.coresys = coresys self.coresys = coresys
@Job(conditions=JobCondition.SUPERVISOR_UPDATED) @Job(conditions=[JobCondition.SUPERVISOR_UPDATED])
async def execute(self) -> bool: async def execute(self) -> bool:
"""Execute the class method.""" """Execute the class method."""
return True return True
@ -447,7 +447,7 @@ async def test_plugins_updated(coresys: CoreSys):
"""Initialize the test class.""" """Initialize the test class."""
self.coresys = coresys self.coresys = coresys
@Job(conditions=JobCondition.PLUGINS_UPDATED) @Job(conditions=[JobCondition.PLUGINS_UPDATED])
async def execute(self) -> bool: async def execute(self) -> bool:
"""Execute the class method.""" """Execute the class method."""
return True return True
@ -477,7 +477,7 @@ async def test_auto_update(coresys: CoreSys):
"""Initialize the test class.""" """Initialize the test class."""
self.coresys = coresys self.coresys = coresys
@Job(conditions=JobCondition.AUTO_UPDATE) @Job(conditions=[JobCondition.AUTO_UPDATE])
async def execute(self) -> bool: async def execute(self) -> bool:
"""Execute the class method.""" """Execute the class method."""
return True return True