Selaa lähdekoodia

added sleep while waiting for threads to finish

Tobias Simetsreiter 5 vuotta sitten
vanhempi
sitoutus
98d2826fe7
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      abe_setup.py

+ 3 - 0
abe_setup.py

@@ -40,6 +40,7 @@ def main():
 
             else:
                 from threading import Thread
+                import time
                 job = Thread(target=sub.clone_repo, kwargs={'cache_dir':args.cache_dir, 'fetch_origin':(not args.no_fetch_origin)})
                 job.start()
                 jobs.append(job)
@@ -51,6 +52,8 @@ def main():
                             to_remove = j
                     if to_remove:
                         jobs.remove(to_remove)
+                    else:
+                        time.sleep(1)
                 if sub.last:
                     while len(jobs):
                         jobs.pop().join()