Merge pull request #2856 from natefoo/postfork-tool-conf-watcher-test-fix

[16.07] Postfork tool conf watcher test fix
This commit is contained in:
Martin Cech
2016-08-25 14:43:13 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
-1
View File
@@ -104,7 +104,6 @@ class AbstractToolBox( Dictifiable, ManagesIntegratedToolPanelMixin, object ):
self._init_tools_from_config( config_filename )
except:
log.exception( "Error loading tools defined in config %s", config_filename )
register_postfork_function(self._tool_conf_watcher.start)
def _init_tools_from_config( self, config_filename ):
"""
+2 -1
View File
@@ -74,7 +74,7 @@ class ToolConfWatcher(object):
def start(self):
if not self._active:
self._active = True
self.thread.start()
register_postfork_function(self.thread.start)
def shutdown(self):
if self._active:
@@ -109,6 +109,7 @@ class ToolConfWatcher(object):
mod_time = time.ctime(os.path.getmtime(path))
with self._lock:
self.paths[path] = mod_time
self.start()
def watch_file(self, tool_conf_file):
self.monitor(tool_conf_file)