mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
things to get more infos for debugging
This commit is contained in:
parent
7785a0b5a6
commit
0093ae8834
@ -289,7 +289,7 @@ class AppController extends Controller
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!$redirect) {
|
if(!$redirect) {
|
||||||
return ['state' => 'not found', 'msg' => 'invalid session'];
|
return ['state' => 'not found', 'msg' => 'invalid session', 'details' => $json];
|
||||||
}
|
}
|
||||||
if ($json['state'] === 'not found') {
|
if ($json['state'] === 'not found') {
|
||||||
$this->Flash->error(__('invalid session'));
|
$this->Flash->error(__('invalid session'));
|
||||||
|
|||||||
@ -359,7 +359,8 @@ namespace model {
|
|||||||
//UniLib::controller::TaskPtr transaction_send_task(new SendTransactionTask(Poco::AutoPtr<Transaction>(this, true)));
|
//UniLib::controller::TaskPtr transaction_send_task(new SendTransactionTask(Poco::AutoPtr<Transaction>(this, true)));
|
||||||
//transaction_send_task->scheduleTask(transaction_send_task);
|
//transaction_send_task->scheduleTask(transaction_send_task);
|
||||||
auto pt = PendingTasksManager::getInstance();
|
auto pt = PendingTasksManager::getInstance();
|
||||||
pt->removeTask(this);
|
|
||||||
|
pt->removeTask(Poco::AutoPtr<Transaction>(this, true));
|
||||||
return 1 == runSendTransaction();
|
return 1 == runSendTransaction();
|
||||||
//return true;
|
//return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,21 +124,35 @@ namespace model {
|
|||||||
|
|
||||||
void ModelBase::duplicate()
|
void ModelBase::duplicate()
|
||||||
{
|
{
|
||||||
Poco::ScopedLock<Poco::Mutex> _lock(mWorkMutex);
|
//Poco::ScopedLock<Poco::Mutex> _lock(mWorkMutex);
|
||||||
|
std::string stack_details = "[ModelBase::duplicate] table: ";
|
||||||
|
stack_details += getTableName();
|
||||||
|
lock(stack_details.data());
|
||||||
mReferenceCount++;
|
mReferenceCount++;
|
||||||
|
printf("[ModelBase::duplicate] new value: %d, table name: %s\n", mReferenceCount, getTableName());
|
||||||
|
unlock();
|
||||||
//printf("[ModelBase::duplicate] new value: %d\n", mReferenceCount);
|
//printf("[ModelBase::duplicate] new value: %d\n", mReferenceCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelBase::release()
|
void ModelBase::release()
|
||||||
{
|
{
|
||||||
Poco::ScopedLock<Poco::Mutex> _lock(mWorkMutex);
|
if(mReferenceCount <= 0) {
|
||||||
mReferenceCount--;
|
throw Poco::Exception("ModelBase already released", getTableName());
|
||||||
//printf("[ModelBase::release] new value: %d\n", mReferenceCount);
|
}
|
||||||
if (0 == mReferenceCount) {
|
std::string stack_details = "[ModelBase::release] table: ";
|
||||||
|
stack_details += getTableName();
|
||||||
|
stack_details += ", reference count: ";
|
||||||
|
stack_details += std::to_string(mReferenceCount);
|
||||||
|
lock(stack_details.data());
|
||||||
|
|
||||||
|
mReferenceCount--;
|
||||||
|
printf("[ModelBase::release] new value: %d, table name: %s\n", mReferenceCount, getTableName());
|
||||||
|
if (0 == mReferenceCount) {
|
||||||
|
unlock();
|
||||||
delete this;
|
delete this;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
unlock();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,11 @@ namespace model
|
|||||||
{
|
{
|
||||||
SHARED_LOCK;
|
SHARED_LOCK;
|
||||||
temp = mResultJsonString;
|
temp = mResultJsonString;
|
||||||
|
if(!mResultJsonString.size()) {
|
||||||
|
return new Poco::JSON::Object;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Poco::JSON::Parser parser;
|
Poco::JSON::Parser parser;
|
||||||
Poco::Dynamic::Var result;
|
Poco::Dynamic::Var result;
|
||||||
try
|
try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user