INNER CODE UNIT · Python

wait_for_service

oracle/docker-images · OracleGoldenGate/21c/bin/deployment-init.py:46

def wait_for_service(port):
    """Return once an SCA service is running, waiting up to two minutes"""
    url = 'http://' + service_address + ':' + str(port) + '/services/v2'
    for sequence in range(24):
        try:
            urllib.request.urlopen(url).read()
            return True
        except urllib.error.URLError:
            time.sleep(5)
    return False


def find_process(processName):
    """Locate a process running locally"""
    for process in psutil.process_iter(['name']):
        if process.info['name'] == processName:
            return process
    return None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…