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 {
|
||||
if(!$redirect) {
|
||||
return ['state' => 'not found', 'msg' => 'invalid session'];
|
||||
return ['state' => 'not found', 'msg' => 'invalid session', 'details' => $json];
|
||||
}
|
||||
if ($json['state'] === 'not found') {
|
||||
$this->Flash->error(__('invalid session'));
|
||||
|
||||
@ -359,7 +359,8 @@ namespace model {
|
||||
//UniLib::controller::TaskPtr transaction_send_task(new SendTransactionTask(Poco::AutoPtr<Transaction>(this, true)));
|
||||
//transaction_send_task->scheduleTask(transaction_send_task);
|
||||
auto pt = PendingTasksManager::getInstance();
|
||||
pt->removeTask(this);
|
||||
|
||||
pt->removeTask(Poco::AutoPtr<Transaction>(this, true));
|
||||
return 1 == runSendTransaction();
|
||||
//return true;
|
||||
}
|
||||
|
||||
@ -124,21 +124,35 @@ namespace model {
|
||||
|
||||
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++;
|
||||
printf("[ModelBase::duplicate] new value: %d, table name: %s\n", mReferenceCount, getTableName());
|
||||
unlock();
|
||||
//printf("[ModelBase::duplicate] new value: %d\n", mReferenceCount);
|
||||
}
|
||||
|
||||
void ModelBase::release()
|
||||
{
|
||||
Poco::ScopedLock<Poco::Mutex> _lock(mWorkMutex);
|
||||
mReferenceCount--;
|
||||
//printf("[ModelBase::release] new value: %d\n", mReferenceCount);
|
||||
if (0 == mReferenceCount) {
|
||||
if(mReferenceCount <= 0) {
|
||||
throw Poco::Exception("ModelBase already released", getTableName());
|
||||
}
|
||||
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;
|
||||
return;
|
||||
}
|
||||
unlock();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -70,7 +70,11 @@ namespace model
|
||||
{
|
||||
SHARED_LOCK;
|
||||
temp = mResultJsonString;
|
||||
if(!mResultJsonString.size()) {
|
||||
return new Poco::JSON::Object;
|
||||
}
|
||||
}
|
||||
|
||||
Poco::JSON::Parser parser;
|
||||
Poco::Dynamic::Var result;
|
||||
try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user