mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch 'grpc' of ssh://**REDACTED**/~/_C++/gradido_login_server into grpc
This commit is contained in:
commit
064acee487
@ -2,7 +2,6 @@
|
||||
|
||||
#include "../tasks/GradidoGroupAddMemberTask.h"
|
||||
|
||||
|
||||
namespace controller {
|
||||
|
||||
PendingTask::PendingTask(model::table::PendingTask* dbModel)
|
||||
@ -18,6 +17,7 @@ namespace controller {
|
||||
Poco::AutoPtr<PendingTask> PendingTask::create(int userId, std::string serializedProtoRequest, model::table::TaskType type)
|
||||
{
|
||||
auto db = new model::table::PendingTask(userId, serializedProtoRequest, type);
|
||||
//auto pending_task = new PendingTask(db);
|
||||
auto pending_task = loadCorrectDerivedClass(db);
|
||||
return Poco::AutoPtr<PendingTask>(pending_task);
|
||||
}
|
||||
@ -29,13 +29,14 @@ namespace controller {
|
||||
std::vector<Poco::AutoPtr<PendingTask>> resultVector;
|
||||
resultVector.reserve(pending_task_list.size());
|
||||
for (auto it = pending_task_list.begin(); it != pending_task_list.end(); it++) {
|
||||
//resultVector.push_back(new PendingTask(new model::table::PendingTask(*it)));
|
||||
resultVector.push_back(loadCorrectDerivedClass(new model::table::PendingTask(*it)));
|
||||
}
|
||||
return resultVector;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
std::vector<Poco::AutoPtr<PendingTask>> PendingTask::loadAll()
|
||||
{
|
||||
auto db = new model::table::PendingTask();
|
||||
@ -65,5 +66,4 @@ namespace controller {
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
@ -22,6 +22,7 @@ namespace controller {
|
||||
|
||||
static std::vector<Poco::AutoPtr<PendingTask>> load(int userId);
|
||||
static std::vector<Poco::AutoPtr<PendingTask>> loadAll();
|
||||
inline bool deleteFromDB() { return mDBModel->deleteFromDB(); }
|
||||
|
||||
inline Poco::AutoPtr<model::table::PendingTask> getModel() { return _getModel<model::table::PendingTask>(); }
|
||||
|
||||
|
||||
@ -75,7 +75,6 @@ namespace model
|
||||
return select;
|
||||
}
|
||||
|
||||
|
||||
Poco::Data::Statement PendingTask::_loadIdFromDB(Poco::Data::Session session)
|
||||
{
|
||||
Poco::Data::Statement select(session);
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
#include "ModelBase.h"
|
||||
#include "Poco/Types.h"
|
||||
|
||||
#include <shared_mutex>
|
||||
|
||||
namespace model {
|
||||
namespace table {
|
||||
|
||||
@ -18,7 +20,7 @@ namespace model {
|
||||
TASK_TYPE_HEDERA_ACCOUNT_CREATE = 25,
|
||||
|
||||
};
|
||||
|
||||
|
||||
typedef Poco::Tuple<int, int, Poco::Data::BLOB, Poco::DateTime, Poco::DateTime, std::string, int> PendingTaskTuple;
|
||||
|
||||
class PendingTask : public ModelBase
|
||||
@ -52,6 +54,7 @@ namespace model {
|
||||
std::string mResultJsonString;
|
||||
int mTaskTypeId;
|
||||
|
||||
std::shared_mutex mSharedMutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user