From 23bd97eaa5626ad96ca3f5d3e97e93d14705ca6d Mon Sep 17 00:00:00 2001 From: chenshijun <csj_sky@126.com> Date: 星期六, 30 三月 2019 17:50:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/yangwu1.3' into 1.3nsq --- QiaoJiaSystem/FaceSearchServer/main.cpp | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/QiaoJiaSystem/FaceSearchServer/main.cpp b/QiaoJiaSystem/FaceSearchServer/main.cpp index 08ca7be..238090d 100644 --- a/QiaoJiaSystem/FaceSearchServer/main.cpp +++ b/QiaoJiaSystem/FaceSearchServer/main.cpp @@ -1,5 +1,4 @@ // -// 浜鸿劯瀵规瘮涓昏繘绋嬪叆鍙� // Created by pans on 4/27/18. // #include <iostream> @@ -22,19 +21,21 @@ DBG("\n\n\nstart\n\n"); - appPref.setLongData("thread.max", 16); - //#todo +// appPref.setIntData("thread.max", 16); -// appPref.setStringData("ipAdd", "192.168.1.185"); -// appPref.setIntData("ipPort", 9200); + if (argc < 3) { + assert("t_value.size()"); + } + appPref.setIntData("RpcFSPort", atoi(argv[1])); + appPref.setIntData("ErlNodePort", atoi(argv[2])); + appPref.setIntData("thread.max", atoi(argv[3]));//绾跨▼姹犲ぇ灏� - //璁剧疆es涓婁紶ip鍜岀鍙� appPref.setStringData("ipAdd", appConfig.getStringProperty("ES_IP")); appPref.setIntData("ipPort", appConfig.getIntProperty("ES_PORT")); - IceRpcServer<FaceFeatureSearchServerI> server("faceCmServer", 10004, "tcp"); + IceRpcServer<FaceFeatureSearchServerI> server("faceCmServer", appPref.getIntData("RpcFSPort"), "tcp"); server.setMessageSizeMax(1024 * 1024 * 50); - server.setPoolInitSize(10); - server.setPoolMaxSize(32); + server.setPoolInitSize(appPref.getIntData("thread.max")); + server.setPoolMaxSize(appPref.getIntData("thread.max")); server.runWaitShutDown(); } \ No newline at end of file -- Gitblit v1.8.0