예제 #1
0
파일: check_sanity.py 프로젝트: onyb/dune
def check_mongod_server() -> bool:
    """
    Check if instance of MongoDB server is running

    :return: True if "mongod" is running, False otherwise
    """
    pid = pidof('mongod')

    if pid == -1:
        return False
    else:
        return True
예제 #2
0
파일: check_sanity.py 프로젝트: onyb/dune
def check_redis_server() -> bool:
    """
    Check if instance of Redis server is running

    :return: True if "redis-server" is running, False otherwise
    """
    pid = pidof('redis-server')

    if pid == -1:
        return False
    else:
        return True