File tree 1 file changed +1
-10
lines changed
python/knot_resolver/manager/files
1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change 13
13
14
14
FilesToWatch = Dict [Path , Optional [str ]]
15
15
16
- _config_store : Optional [ConfigStore ] = None
17
-
18
16
19
17
def watched_files_config (config : KresConfig ) -> List [Any ]:
20
18
return [
@@ -40,11 +38,7 @@ def __init__(self, files: FilesToWatch) -> None:
40
38
41
39
def _trigger (self , cmd : Optional [str ]) -> None :
42
40
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
48
42
logger .info ("Reloading policy rules has finished" )
49
43
50
44
if not cmd :
@@ -162,8 +156,5 @@ async def _init_files_watchdog(config: KresConfig) -> None:
162
156
163
157
164
158
async def init_files_watchdog (config_store : ConfigStore ) -> None :
165
- global _config_store
166
- _config_store = config_store
167
-
168
159
# register files watchdog callback
169
160
await config_store .register_on_change_callback (_init_files_watchdog )
You can’t perform that action at this time.
0 commit comments