mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add config option for worker count
This commit is contained in:
parent
81aacdb58b
commit
01d00ae309
@ -186,7 +186,7 @@ int Gradido_LoginServer::main(const std::vector<std::string>& args)
|
|||||||
EmailManager::getInstance()->init(config());
|
EmailManager::getInstance()->init(config());
|
||||||
|
|
||||||
// start cpu scheduler
|
// start cpu scheduler
|
||||||
uint8_t worker_count = Poco::Environment::processorCount() * 2;
|
uint8_t worker_count = (uint8_t)config().getInt("cpu_worker", Poco::Environment::processorCount() * 2);
|
||||||
|
|
||||||
ServerConfig::g_CPUScheduler = new UniLib::controller::CPUSheduler(worker_count, "Default Worker");
|
ServerConfig::g_CPUScheduler = new UniLib::controller::CPUSheduler(worker_count, "Default Worker");
|
||||||
ServerConfig::g_CryptoCPUScheduler = new UniLib::controller::CPUSheduler(2, "Crypto Worker");
|
ServerConfig::g_CryptoCPUScheduler = new UniLib::controller::CPUSheduler(2, "Crypto Worker");
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
#include "Poco/LocalDateTime.h"
|
#include "Poco/LocalDateTime.h"
|
||||||
#include "Poco/DateTimeFormat.h"
|
#include "Poco/DateTimeFormat.h"
|
||||||
#include "Poco/DateTimeFormatter.h"
|
#include "Poco/DateTimeFormatter.h"
|
||||||
|
#include "Poco/Environment.h"
|
||||||
|
|
||||||
#include "model/table/HederaAccount.h"
|
#include "model/table/HederaAccount.h"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user