Skip to content

Commit b8f5ddd

Browse files
committed
fixup! fixup! fixup! fixup! manager: files: watchdog: added RPZ files
1 parent 5cfe630 commit b8f5ddd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

python/knot_resolver/manager/files/watchdog.py

+6
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ def on_deleted(self, event: FileSystemEvent) -> None:
8787
if cmd in self._timers:
8888
self._timers[cmd].cancel()
8989

90+
def on_moved(self, event: FileSystemEvent) -> None:
91+
src_path = Path(str(event.src_path))
92+
if src_path in self._files.keys():
93+
logger.info(f"Watched file '{src_path}' has been moved")
94+
self._trigger(self._files[src_path])
95+
9096
def on_modified(self, event: FileSystemEvent) -> None:
9197
src_path = Path(str(event.src_path))
9298
if src_path in self._files.keys():

tests/packaging/interactive/rpz_watchdog.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ echo "48.zz.101.db8.2001.rpz-client-ip CNAME rpz-passthru." >> $rpz_file.new
9090
mv -f $rpz_file.new $rpz_file
9191

9292
# wait for files reload to finish
93-
sleep 10
93+
sleep 6
9494

9595
if [ $(count_errors) -ne $err_count ] || [ $(count_reloads) -eq $rel_count ]; then
9696
echo "Could not reload replaced RPZ file."

0 commit comments

Comments
 (0)