I can't seem to put a comment lower, but on line 317, we currently raise a ValueError if the number of subtasks is not right.  It shouldn't happen, I acknowledge, and it's bad if it does.  But it's bad that we throw an exception here too, and we don't expect it to happen, so either make it just log (as you did with the other) or remove.  I would also add a comment there saying that because we've just started the subtasks, there should be no more exceptions raised.