Handle removed files
This commit is contained in:
parent
d1d05c9dcf
commit
b17dab0cd4
|
@ -115,9 +115,16 @@ class ConfigLoader(MultiRunnedThread):
|
||||||
with self.lock:
|
with self.lock:
|
||||||
for path, functions in self.watched.items():
|
for path, functions in self.watched.items():
|
||||||
for function in functions:
|
for function in functions:
|
||||||
if self.watcher(path):
|
try:
|
||||||
function(path)
|
modified = self.watcher(path)
|
||||||
|
except OSError as e:
|
||||||
|
modified = True
|
||||||
|
self.exception('Error while running watcher for path {0}: {1}', path, str(e))
|
||||||
|
else:
|
||||||
|
if modified:
|
||||||
toload.append(path)
|
toload.append(path)
|
||||||
|
if modified:
|
||||||
|
function(path)
|
||||||
with self.lock:
|
with self.lock:
|
||||||
for key, functions in list(self.missing.items()):
|
for key, functions in list(self.missing.items()):
|
||||||
remove = False
|
remove = False
|
||||||
|
|
Loading…
Reference in New Issue