def start_server(port): rules = [{ 'command': 'reply', 'handler': (STRATEGY_QUEUE, handlers.ReplyHandler) }] router = moebius.ZMQRouter(rules) srv = moebius.ZMQServer('tcp://127.0.0.1:%s' % port, router) print 'Server started' srv.start()
def start_server(port): logger.debug("PID: %d, PPID: %d" % (os.getpid(), os.getppid())) rules = [{ 'command': 'reply', 'handler': (STRATEGY_QUEUE, handlers.ReplyHandler) }] router = moebius.ZMQRouter(rules) srv = moebius.ZMQServer('tcp://127.0.0.1:%s' % port, router) print 'Server started' srv.start()
def start_server(port): rules = [{ 'command': 'reply', 'handler': (STRATEGY_QUEUE, handlers.ReplyHandler3) }] router = moebius.ZMQRouter(rules) broom = moebius.Broom(classname=moebius.ZMQServer, router=router, workers=40, tmpdir="tmp") srv = moebius.BroomServer('tcp://127.0.0.1:%s' % port, broom, 1) print 'Server created' srv.start()
def start_server(port): logger.debug("PID: %d, PPID: %d" % (os.getpid(), os.getppid())) rules = [{ 'command': 'reply', 'handler': (STRATEGY_QUEUE, handlers.ReplyHandler3) }] router = moebius.ZMQRouter(rules) broom = moebius.Broom(classname=moebius.ZMQServer, router=router, workers=5, tmpdir="tmp") broom.run() srv = moebius.BroomServer('tcp://127.0.0.1:%s' % port, broom, 1) print 'Server created' srv.start()
def start_server(port): router = moebius.ZMQRouter(rules) srv = moebius.ZMQServer('tcp://127.0.0.1:%s' % port, router) print 'Server started' srv.start()