def _wait_for_status_file()

in src/sagemaker_training/mpi.py [0:0]


    def _wait_for_status_file(self, status_file):
        start_time = time.time()
        file_found = os.path.exists(status_file)
        while not file_found:
            time.sleep(30)
            curr_time = time.time()
            # Check connectivity with master every 2 minutes
            if int(curr_time - start_time) % 120 == 0:
                logger.info("status file not found...")
                if not _can_connect(self._master_hostname):
                    return False
            file_found = os.path.exists(status_file)
        return True