From 915b086fe29c6e1eb2b89ec9da79c6ff9143fe41 Mon Sep 17 00:00:00 2001 From: Aidaho12 Date: Mon, 10 Dec 2018 10:16:59 +0600 Subject: [PATCH] v3.4 Bugs --- app/tools/keep_alive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/tools/keep_alive.py b/app/tools/keep_alive.py index e5717612..0d89ad98 100644 --- a/app/tools/keep_alive.py +++ b/app/tools/keep_alive.py @@ -20,12 +20,12 @@ class GracefulKiller: def main(): - servers = sql.select_keep_alive() port = sql.get_setting('haproxy_sock_port') readstats = "" killer = GracefulKiller() while True: + servers = sql.select_keep_alive() for serv in servers: try: readstats = subprocess.check_output(["echo show stat | nc "+serv[0]+" "+port], shell=True) @@ -42,7 +42,7 @@ def main(): sys.exit() else: cur_stat_service = "Ok" - + time.sleep(40) if __name__ == "__main__": funct.logging("localhost", " Keep alive service started", keep_alive=1)