This seems pretty nutty... Why are you iterating every td? Doesn't this for every IO is going to be super slow, depending on what job is being run. You're looping each work item, in each worker, in each td - for every IO.