def serve(self, data) : # Create userAgentMessage and send it to the launcher process msg = weioRunnerGlobals.userAgentMessage() for connUuid, conn in weioRunnerGlobals.weioConnections.iteritems(): if (conn == self): msg.connUuid = connUuid msg.req = data["request"] msg.data = data["data"] if "callback" in data: msg.callbackJS = data["callback"] # Send message to launcher process weioRunnerGlobals.QOUT.put(msg)
def serve(self, data): # Create userAgentMessage and send it to the launcher process msg = weioRunnerGlobals.userAgentMessage() for connUuid, conn in weioRunnerGlobals.weioConnections.iteritems(): if (conn == self): msg.connUuid = connUuid msg.req = data["request"] msg.data = data["data"] if "callback" in data: msg.callbackJS = data["callback"] # Send message to launcher process weioRunnerGlobals.QOUT.put(msg)
def serve(self, data) : # Create userAgentMessage and send it to the launcher process msg = weioRunnerGlobals.userAgentMessage() #print "DATA: ", data if (type(data) is dict): #print "keys : %s" % data.keys() for key in data: if key == "request": msg.req = data["request"] elif key == "data": msg.data = data["data"] elif key == "callback": msg.callbackJS = data["callback"] # Send message to launcher process weioRunnerGlobals.QOUT.put(msg)
def serve(self, data): # Create userAgentMessage and send it to the launcher process msg = weioRunnerGlobals.userAgentMessage() #print "DATA: ", data if (type(data) is dict): #print "keys : %s" % data.keys() for key in data: if key == "request": msg.req = data["request"] elif key == "data": msg.data = data["data"] elif key == "callback": msg.callbackJS = data["callback"] # Send message to launcher process weioRunnerGlobals.QOUT.put(msg)
def serve(self, data) : for connUuid, conn in weioRunnerGlobals.weioConnections.iteritems(): if (conn == self): # Create userAgentMessage and send it to the launcher process msg = weioRunnerGlobals.userAgentMessage() msg.connUuid = connUuid if (type(data) is dict): #print "keys : %s" % data.keys() for key in data: if key == "request": msg.req = data["request"] elif key == "data": msg.data = data["data"] elif key == "callback": msg.callbackJS = data["callback"] # Send message to launcher process weioRunnerGlobals.QOUT.put(msg)
def serve(self, data): for connUuid, conn in weioRunnerGlobals.weioConnections.iteritems(): if (conn == self): # Create userAgentMessage and send it to the launcher process msg = weioRunnerGlobals.userAgentMessage() msg.connUuid = connUuid if (type(data) is dict): #print "keys : %s" % data.keys() for key in data: if key == "request": msg.req = data["request"] elif key == "data": msg.data = data["data"] elif key == "callback": msg.callbackJS = data["callback"] # Send message to launcher process weioRunnerGlobals.QOUT.put(msg)
if __name__ == '__main__': ### # Initialize global USER API instances ### m = multiprocessing.Manager() weioUserApi.attach = weioUserApi.WeioAttach() #weioUserApi.shared = weioUserApi.WeioSharedVar() weioUserApi.console = weioUserApi.WeioPrint() manager = multiprocessing.Manager() weioUserApi.sharedVar = manager.dict() # weioMsg weioUserApi.weioServerMsg = weioUserApi.WeioServerMsg(weioRunnerGlobals.QIN, weioRunnerGlobals.userAgentMessage()) # weioConnUuids weioRunnerGlobals.weioConnUuids = manager.list() weioUserApi.weioConns = weioRunnerGlobals.weioConnUuids confFile = weioConfig.getConfiguration() # set python working directory #os.chdir("userFiles/"+sys.argv[1]) myPort = confFile["userAppPort"] options.define("port", default=myPort, type=int) options.define("addr", default=confFile['ip']) apiRouter = SockJSRouter(WeioHandler, '/api')
if __name__ == '__main__': ### # Initialize global USER API instances ### m = multiprocessing.Manager() weioUserApi.attach = weioUserApi.WeioAttach() #weioUserApi.shared = weioUserApi.WeioSharedVar() weioUserApi.console = weioUserApi.WeioPrint() manager = multiprocessing.Manager() weioUserApi.sharedVar = manager.dict() # weioMsg weioUserApi.weioServerMsg = weioUserApi.WeioServerMsg( weioRunnerGlobals.QIN, weioRunnerGlobals.userAgentMessage()) # weioConnUuids weioRunnerGlobals.weioConnUuids = manager.list() weioUserApi.weioConns = weioRunnerGlobals.weioConnUuids confFile = weioConfig.getConfiguration() # set python working directory #os.chdir("userFiles/"+sys.argv[1]) myPort = confFile["userAppPort"] options.define("port", default=myPort, type=int) options.define("addr", default=confFile['ip']) apiRouter = SockJSRouter(WeioHandler, '/api')