Waiting on queue.unfinished_tasks instead of checking a list of threads and calling is_alive() on each of them. Added a sleep(0.1) between checks to ease the busyloop. Reducing metadata downloads to primary_db only.