def skip_job(counter):
try:<EOL><INDENT>host_number = int(socket.gethostname().split('<STR_LIT:->')[-<NUM_LIT:1>])<EOL><DEDENT>except ValueError:<EOL><INDENT>return False<EOL><DEDENT>if (counter + host_number - (NUMBER_OF_HOSTS - <NUM_LIT:1>)) % NUMBER_OF_HOSTS == <NUM_LIT:0>:<EOL><INDENT>return False<EOL><DEDENT>return True<EOL>
Should we skip the job based on its number

    If the machine has a number at the end of its hostname (n), and we have m
    machines in the pool -

    on machine 1, run job 1, 1 + m, 1+2m etc

    on machine 2, run job 2, 2 + m , 2 + 2m etc

    Else run all the jobs