This version avoids looping as well, doesn't it?  The only big difference in this version is that we avoid counting the jobs with that job id, since there's little point - if there's only one entry in the jobids dict, we know all the machines have the same jobid.