don't update while worker processes are running
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user