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
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