1
This commit is contained in:
parent
8689b4e967
commit
f9582530a1
@ -1,14 +1,36 @@
|
|||||||
#include "precompile.h"
|
#include "precompile.h"
|
||||||
|
|
||||||
#include <a8/openssl.h>
|
#include <a8/openssl.h>
|
||||||
|
#include <a8/udplog.h>
|
||||||
|
|
||||||
#include "dbengine.h"
|
#include "dbengine.h"
|
||||||
#include "jsondatamgr.h"
|
#include "jsondatamgr.h"
|
||||||
|
|
||||||
|
static void OnDBError(a8::XParams& param, int error_code, const std::string& error_msg)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
a8::UdpLog::Instance()->Debug
|
||||||
|
(
|
||||||
|
"on dberror %s",
|
||||||
|
{
|
||||||
|
error_msg
|
||||||
|
}
|
||||||
|
);
|
||||||
|
#endif
|
||||||
|
a8::UdpLog::Instance()->Warning
|
||||||
|
(
|
||||||
|
"on dberror %s",
|
||||||
|
{
|
||||||
|
error_msg
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void DBEngine::Init()
|
void DBEngine::Init()
|
||||||
{
|
{
|
||||||
f8::DBPool::Instance()->Init();
|
f8::DBPool::Instance()->Init();
|
||||||
f8::DBPool::Instance()->SetThreadNum(16);
|
f8::DBPool::Instance()->SetThreadNum(16);
|
||||||
|
f8::DBPool::Instance()->on_dberror = OnDBError;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DBEngine::UnInit()
|
void DBEngine::UnInit()
|
||||||
|
2
third_party/framework
vendored
2
third_party/framework
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 2cd0d756d8b4314dd261c1b4a10036447b3da358
|
Subproject commit e53cddeed3445074b9f1fb3a16d4f4475a5e8e2a
|
Loading…
x
Reference in New Issue
Block a user