Skip to content

Commit

Permalink
manager: register reload_files callback
Browse files Browse the repository at this point in the history
  • Loading branch information
alesmrazek committed Dec 27, 2024
1 parent 579de40 commit b367f54
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion python/knot_resolver/manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@
from knot_resolver.controller.interface import Subprocess, SubprocessController, SubprocessStatus, SubprocessType
from knot_resolver.controller.registered_workers import command_registered_workers, get_registered_workers_kresids
from knot_resolver.datamodel import KresConfig
from knot_resolver.manager.config_store import ConfigStore, only_on_real_changes_update, only_on_real_changes_verifier
from knot_resolver.manager.config_store import (
ConfigStore,
only_on_no_changes_update,
only_on_real_changes_update,
only_on_real_changes_verifier,
)
from knot_resolver.manager.files import files_reload
from knot_resolver.utils.compat.asyncio import create_task
from knot_resolver.utils.functional import Result
from knot_resolver.utils.modeling.types import NoneType
Expand Down Expand Up @@ -151,6 +157,9 @@ def config_nodes(config: KresConfig) -> List[Any]:
only_on_real_changes_update(config_nodes)(self.set_new_tls_sticket_secret)
)

# register callback that reloads files (TLS cert files) if selected configuration has not been changed
await config_store.register_on_change_callback(only_on_no_changes_update(config_nodes)(files_reload))

# register controller config change listeners
await config_store.register_verifier(_deny_max_worker_changes)

Expand Down

0 comments on commit b367f54

Please sign in to comment.