diff options
author | Aleš Mrázek <ales.mrazek@nic.cz> | 2025-01-09 13:58:44 +0100 |
---|---|---|
committer | Aleš Mrázek <ales.mrazek@nic.cz> | 2025-01-14 10:03:29 +0100 |
commit | 229303225f6aee6bbafed4b7787a5a35ebfa41c4 (patch) | |
tree | dd1849ac1d6ad44dea6617dd9e097f8b5baed2c6 | |
parent | doc/user/config-network-server-tls.rst: added info about 'files-watchdog' con... (diff) | |
download | knot-resolver-229303225f6aee6bbafed4b7787a5a35ebfa41c4.tar.xz knot-resolver-229303225f6aee6bbafed4b7787a5a35ebfa41c4.zip |
manager: files: watchdog: added 'files-watchdog' to TLS config
-rw-r--r-- | python/knot_resolver/manager/files/watchdog.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/python/knot_resolver/manager/files/watchdog.py b/python/knot_resolver/manager/files/watchdog.py index 5dcc2d5e..e0abf56c 100644 --- a/python/knot_resolver/manager/files/watchdog.py +++ b/python/knot_resolver/manager/files/watchdog.py @@ -1,24 +1,23 @@ import logging from pathlib import Path from threading import Timer -from typing import List, Optional +from typing import Any, List, Optional from knot_resolver.constants import WATCHDOG_LIB from knot_resolver.controller.registered_workers import command_registered_workers from knot_resolver.datamodel import KresConfig -from knot_resolver.datamodel.types import File from knot_resolver.manager.config_store import ConfigStore, only_on_real_changes_update from knot_resolver.utils import compat logger = logging.getLogger(__name__) -def tls_cert_paths(config: KresConfig) -> List[str]: - files: List[Optional[File]] = [ +def tls_cert_files_config(config: KresConfig) -> List[Any]: + return [ + config.network.tls.files_watchdog, config.network.tls.cert_file, config.network.tls.key_file, ] - return [str(file) for file in files if file is not None] if WATCHDOG_LIB: @@ -109,7 +108,7 @@ if WATCHDOG_LIB: self._observer.join() -@only_on_real_changes_update(tls_cert_paths) +@only_on_real_changes_update(tls_cert_files_config) async def _init_tls_cert_watchdog(config: KresConfig) -> None: if WATCHDOG_LIB: global _tls_cert_watchdog |