Skip to content

Commit 7699282

Browse files
committed
fixup! manager: files: watchdog: added RPZ files
1 parent 83b0c6f commit 7699282

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

python/knot_resolver/manager/files/watchdog.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
FilesToWatch = Dict[Path, Optional[str]]
1515

16-
_config_store: Optional[ConfigStore] = None
17-
1816

1917
def watched_files_config(config: KresConfig) -> List[Any]:
2018
return [
@@ -40,11 +38,7 @@ def __init__(self, files: FilesToWatch) -> None:
4038

4139
def _trigger(self, cmd: Optional[str]) -> None:
4240
def policy_reload() -> None:
43-
assert _config_store is not None
44-
if compat.asyncio.is_event_loop_running():
45-
compat.asyncio.create_task(_config_store.renew())
46-
else:
47-
compat.asyncio.run(_config_store.renew())
41+
# TODO: reload policy rules
4842
logger.info("Reloading policy rules has finished")
4943

5044
if not cmd:
@@ -162,8 +156,5 @@ async def _init_files_watchdog(config: KresConfig) -> None:
162156

163157

164158
async def init_files_watchdog(config_store: ConfigStore) -> None:
165-
global _config_store
166-
_config_store = config_store
167-
168159
# register files watchdog callback
169160
await config_store.register_on_change_callback(_init_files_watchdog)

0 commit comments

Comments
 (0)