Django Mulitprocessing with Progress Bar

December 10, 2018

Instead of rolling my own progress bars on new batch management commands, I've been using tqdm lately. Here's a quick snippet for multiprocessing a batch of items in a queryset. You'll need tqdm to run this: pip install tqdm Note: Since the function that I'm calling is using django's ORM, I close all db connections. Things tend to go wrong when forked processes are all using the same conne...