import websocket_server
import event_hub_listener
from multiprocessing import Process

def start_WS_server():
    websocket_server.start_websocket_server()

def run_HUB_receiver():
    event_hub_listener.start_event_hub_listener()

def runInParallel(*fns):
  proc = []
  for fn in fns:
    p = Process(target=fn)
    p.start()
    proc.append(p)
  for p in proc:
    p.join()

if __name__ == '__main__':
    runInParallel(start_WS_server, run_HUB_receiver)
