From 54a2384130cff811598fdd67ee92f492d0ddc330 Mon Sep 17 00:00:00 2001 From: "David Adam (zanchey)" <zanchey@ucc.gu.uwa.edu.au> Date: Wed, 21 Dec 2011 23:42:14 +0800 Subject: [PATCH] wait for all backups to complete before producing output --- rdiff-manager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rdiff-manager.py b/rdiff-manager.py index 98072af..faf8cec 100755 --- a/rdiff-manager.py +++ b/rdiff-manager.py @@ -81,7 +81,10 @@ if __name__ == '__main__': concurrent_num = len(hosts) pool = Pool(concurrent_num) + # Start the work and wait for it to finish results = [ (host, pool.apply_async(rdiff_backup, (host, )) ) for host in hosts ] + pool.close() + pool.join() for host, r in results: print("Backup results for", host['hostname']) -- GitLab