def push_job(self, flush=False, timeout=False):
        job = None
        while job is None:
            job = self.server.last_job
            if job is None:
                self.logger.warn("No jobs available for worker!")
                sleep(0.1)

        if self.last_job == job and not timeout:
            self.logger.info("Ignoring non timeout resend of job id {} to worker {}.{}"
                             .format(job.job_id, self.address, self.worker))
            return

        # we push the next difficulty here instead of in the vardiff block to
        # prevent a potential mismatch between client and server
        if self.next_diff != self.difficulty:
            self.logger.info(
                "Pushing diff update {} -> {} before job for {}.{}"
                .format(self.difficulty, self.next_diff, self.address, self.worker))
            self.difficulty = self.next_diff
            self.push_difficulty()

        if __debug__:
            self.logger.debug("Sending job id {} to worker {}.{}{}"
                              .format(job.job_id, self.address, self.worker,
                                      " after timeout" if timeout else ''))

        self._push(job)
Perform bulk look up of friendships from user ID or screenname
dataset/ETHPy150Open simplecrypto/powerpool/powerpool/stratum_server.py/StratumClient.push_job--crossover with--dataset/ETHPy150Open tweepy/tweepy/tweepy/api.py/API.lookup_friendships