From af5e766b067254e479717632d7a4f9dfdd212a97 Mon Sep 17 00:00:00 2001 From: Giovanni Harting <539@idlegandalf.com> Date: Tue, 18 May 2021 21:14:31 +0200 Subject: [PATCH] don't update while worker processes are running --- master.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/master.py b/master.py index 134633a..e0a6799 100644 --- a/master.py +++ b/master.py @@ -210,7 +210,7 @@ def update_git2svn(): stderr=subprocess.STDOUT).stdout.decode()) else: os.chdir(git_dir) - logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdf"], check=True, stdout=subprocess.PIPE, + logging.debug("[GIT] %s", subprocess.run(["git", "clean", "-xdf"], check=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()) logging.debug("[GIT] %s", subprocess.run(["git", "reset", "--hard"], check=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.decode()) @@ -346,7 +346,7 @@ if __name__ == '__main__': while True: try: - if time.time() - update_last > 900: + if time.time() - update_last > 900 and q.qsize() == 0: update_last = time.time() update_git2svn() fill_queue()