Exemplo n.º 1
0
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
Exemplo n.º 2
0
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