File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ inline int CommandLoad::execute(string& sResult)
126
126
// 获取服务框架配置文件
127
127
_confPath = _serverDir + FILE_SEP + " conf" + FILE_SEP;
128
128
_confFile = _confPath + _desc.application + " ." + _desc.serverName + " .config.conf" ;
129
+
129
130
// 若exePath不合法采用默认路径
130
131
// 注意java服务启动方式特殊 可执行文件为java 须特殊处理
131
132
if (_exePath.empty ())
@@ -136,11 +137,14 @@ inline int CommandLoad::execute(string& sResult)
136
137
try
137
138
{
138
139
TC_Config conf;
139
- conf.parseFile (_confFile);
140
+ conf.parseString (_desc.profile );
141
+
140
142
_exeFile = conf.get (" /tars/application/server<java>" , " java" );
141
143
}
142
144
catch (exception &ex)
143
145
{
146
+ NODE_LOG (" KeepAliveThread" )->error () << " parse template error:" << ex.what () << endl;
147
+
144
148
_exeFile = " java" ;
145
149
}
146
150
}
@@ -149,11 +153,13 @@ inline int CommandLoad::execute(string& sResult)
149
153
try
150
154
{
151
155
TC_Config conf;
152
- conf.parseFile (_confFile );
156
+ conf.parseFile (_desc. profile );
153
157
_exeFile = conf.get (" /tars/application/server<nodejs>" , " node" );
154
158
}
155
159
catch (exception &ex)
156
160
{
161
+ NODE_LOG (" KeepAliveThread" )->error () << " parse template error:" << ex.what () << endl;
162
+
157
163
_exeFile = " node" ;
158
164
}
159
165
}
@@ -162,11 +168,13 @@ inline int CommandLoad::execute(string& sResult)
162
168
try
163
169
{
164
170
TC_Config conf;
165
- conf.parseFile (_confFile );
171
+ conf.parseFile (_desc. profile );
166
172
_exeFile = conf.get (" /tars/application/server<php>" , " php" );
167
173
}
168
174
catch (exception &ex)
169
175
{
176
+ NODE_LOG (" KeepAliveThread" )->error () << " parse template error:" << ex.what () << endl;
177
+
170
178
_exeFile = " php" ;
171
179
}
172
180
}
You can’t perform that action at this time.
0 commit comments