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())
|
stderr=subprocess.STDOUT).stdout.decode())
|
||||||
else:
|
else:
|
||||||
os.chdir(git_dir)
|
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())
|
stderr=subprocess.STDOUT).stdout.decode())
|
||||||
logging.debug("[GIT] %s", subprocess.run(["git", "reset", "--hard"], check=True, stdout=subprocess.PIPE,
|
logging.debug("[GIT] %s", subprocess.run(["git", "reset", "--hard"], check=True, stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT).stdout.decode())
|
stderr=subprocess.STDOUT).stdout.decode())
|
||||||
@@ -346,7 +346,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
if time.time() - update_last > 900:
|
if time.time() - update_last > 900 and q.qsize() == 0:
|
||||||
update_last = time.time()
|
update_last = time.time()
|
||||||
update_git2svn()
|
update_git2svn()
|
||||||
fill_queue()
|
fill_queue()
|
||||||
|
Reference in New Issue
Block a user