I did try using celery to queue up doc build tasks at one point, but that apparently caused celery to fall over once all 50000+ docs were queued. So, now I have a script that carefully rebuilds docs one after another.