in pydeequ/scala_utils.py [0:0]
def __init__(self, gateway):
self.gateway = gateway
# P4j will return false if the callback server is already started
# https://github.com/bartdag/py4j/blob/master/py4j-python/src/py4j/java_gateway.py
callback_server = self.gateway.get_callback_server()
# TODO clean
if callback_server is None:
self.gateway.start_callback_server()
print("Python Callback server started!") # TODO Logging
elif callback_server.is_shutdown:
callback_server.close()
self.gateway.restart_callback_server()
# Have you tried turning it off and on again?
# TODO why do we need to restart this every time?
# TODO Will this break during chained function calls?
print("PythonCallback server restarted!")