Rather use the server args for setting its thread count

This commit is contained in:
emeric
2020-10-17 22:41:15 +02:00
parent 5a6abdcba9
commit 4bd5344b7d
+5 -5
View File
@@ -76,6 +76,11 @@ generateWtConfig(std::string execPath)
if (!wtAccessLogFilePath.empty()) if (!wtAccessLogFilePath.empty())
args.push_back("--accesslog=" + wtAccessLogFilePath.string()); args.push_back("--accesslog=" + wtAccessLogFilePath.string());
{
const unsigned long httpServerThreadCount {configHttpServerThreadCount ? configHttpServerThreadCount : std::max<unsigned long>(1, std::thread::hardware_concurrency())};
args.push_back("--threads=" + std::to_string(httpServerThreadCount));
}
// Generate the wt_config.xml file // Generate the wt_config.xml file
boost::property_tree::ptree pt; boost::property_tree::ptree pt;
@@ -84,11 +89,6 @@ generateWtConfig(std::string execPath)
pt.put("server.application-settings.log-config", Service<IConfig>::get()->getString("log-config", "* -debug -info:WebRequest")); pt.put("server.application-settings.log-config", Service<IConfig>::get()->getString("log-config", "* -debug -info:WebRequest"));
pt.put("server.application-settings.behind-reverse-proxy", Service<IConfig>::get()->getBool("behind-reverse-proxy", false)); pt.put("server.application-settings.behind-reverse-proxy", Service<IConfig>::get()->getBool("behind-reverse-proxy", false));
{
const unsigned long httpServerThreadCount {configHttpServerThreadCount ? configHttpServerThreadCount : std::max<unsigned long>(1, std::thread::hardware_concurrency())};
pt.put("server.application-settings.num-threads", httpServerThreadCount);
}
{ {
boost::property_tree::ptree viewport; boost::property_tree::ptree viewport;
viewport.put("<xmlattr>.name", "viewport"); viewport.put("<xmlattr>.name", "viewport");