def wait(self, interval=SGE_WAIT):
        """Wait until the job finishes, and poll SGE on its status."""
        finished = False
        while not finished:
            time.sleep(interval)
            interval = min(2 * interval, 60)
            finished = os.system("qstat -j %s > /dev/null" % (self.name))
Wait until the job finishes, and poll SGE on its status.