From d7c98929576068c1dc91a6c5751d891a5f083af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 26 Nov 2021 13:48:46 -0500 Subject: [PATCH] fix: Wait for DBs to be down before returning in stop script --- bin/stop.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/stop.py b/bin/stop.py index b45f3aa..a156c80 100755 --- a/bin/stop.py +++ b/bin/stop.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -from subprocess import Popen +from subprocess import Popen, run from redis import Redis @@ -16,7 +16,10 @@ def main(): r.delete('shutdown') r = Redis(unix_socket_path=get_socket_path('cache')) r.delete('tree_cache') - Popen(['run_backend', '--stop']) + print('Shutting down databases...') + p = run(['run_backend', '--stop']) + p.check_returncode() + print('done.') if __name__ == '__main__':