Instead of restarting services, stop them and start. This

way we eliminate issue of 'locked' TCP ports.
This commit is contained in:
Ante Karamatic 2014-02-16 19:32:47 +01:00
parent d7afa5ad96
commit 3c2fa8b8b5

@ -220,7 +220,9 @@ def restart_on_change(restart_map):
if checksums[path] != file_hash(path):
restarts += restart_map[path]
for service_name in list(OrderedDict.fromkeys(restarts)):
service('restart', service_name)
service('stop', service_name)
for service_name in list(OrderedDict.fromkeys(restarts)):
service('start', service_name)
return wrapped_f
return wrap