mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'grpc' of ssh://**REDACTED**/~/c++/gradido_login_server into grpc
This commit is contained in:
commit
fdcbc024b6
@ -175,7 +175,7 @@ PingServerTask::~PingServerTask()
|
||||
|
||||
int PingServerTask::run()
|
||||
{
|
||||
return 0;
|
||||
//return 0;
|
||||
auto current = Poco::DateTime();
|
||||
if (model::table::NODE_SERVER_GRADIDO_COMMUNITY == mNodeServer->getModel()->getNodeServerType()) {
|
||||
std::string url_port = mNodeServer->getModel()->getUrlWithPort();
|
||||
|
||||
@ -54,6 +54,29 @@ namespace DataTypeConverter
|
||||
return NUMBER_PARSE_LOGIC_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
NumberParseState strToInt(const std::string& input, Poco::UInt64& result)
|
||||
{
|
||||
try {
|
||||
result = stoull(input);
|
||||
return NUMBER_PARSE_OKAY;
|
||||
}
|
||||
catch (const std::invalid_argument& ia)
|
||||
{
|
||||
printf("[strToInt] exception: invalid argument: %s\n", ia.what());
|
||||
return NUMBER_PARSE_INVALID_ARGUMENT;
|
||||
}
|
||||
catch (const std::out_of_range& oor)
|
||||
{
|
||||
printf("[strToInt] exception: out or range: %s\n", oor.what());
|
||||
return NUMBER_PARSE_OUT_OF_RANGE;
|
||||
}
|
||||
catch (const std::logic_error & ler)
|
||||
{
|
||||
printf("[strToInt] exception: logical error: %s\n", ler.what());
|
||||
return NUMBER_PARSE_LOGIC_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
NumberParseState strToDouble(const std::string& input, double& result)
|
||||
{
|
||||
|
||||
@ -27,6 +27,7 @@ namespace DataTypeConverter {
|
||||
|
||||
NumberParseState strToInt(const std::string& input, int& result);
|
||||
NumberParseState strToInt(const std::string& input, unsigned long long& result);
|
||||
NumberParseState strToInt(const std::string& input, Poco::UInt64& result);
|
||||
NumberParseState strToDouble(const std::string& input, double& result);
|
||||
|
||||
MemoryBin* hexToBin(const std::string& hexString);
|
||||
|
||||
@ -121,6 +121,8 @@ namespace model {
|
||||
// write new group_id in user table
|
||||
user_model->setGroupId(group_model->getID());
|
||||
user_model->updateIntoDB("group_id", group_model->getID());
|
||||
|
||||
printf("[GroupMemberUpdate::transactionAccepted] finished\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -307,7 +307,7 @@ namespace model {
|
||||
}
|
||||
|
||||
//getModel()->updateIntoDB("request", )
|
||||
|
||||
printf("[Transaction::sign] reference-count: %d\n", mReferenceCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -590,6 +590,7 @@ namespace model {
|
||||
int SendTransactionTask::run()
|
||||
{
|
||||
auto result = mTransaction->runSendTransaction();
|
||||
printf("[SendTransactionTask::run] result: %d\n", result);
|
||||
// delete because of error
|
||||
if (-1 == result) {
|
||||
mTransaction->deleteFromDB();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user