代码格式调整
This commit is contained in:
parent
5156f6eb84
commit
fad58e9707
@ -348,12 +348,6 @@ namespace f8
|
||||
}
|
||||
}
|
||||
|
||||
AsyncQueryRequest* GetAsyncQueryRequest(long long seqid)
|
||||
{
|
||||
auto itr = async_query_hash.find(seqid);
|
||||
return itr != async_query_hash.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
void AsyncSqlOnOk(long long seqid, DataSet* data_set)
|
||||
{
|
||||
AsyncQueryRequest* request = GetAsyncQueryRequest(seqid);
|
||||
@ -418,15 +412,26 @@ namespace f8
|
||||
}
|
||||
a8::Timer::Instance()->AddDeadLineTimerAndAttach(1000 * 10,
|
||||
a8::XParams()
|
||||
.SetSender(this)
|
||||
.SetParam1(p->context_id),
|
||||
.SetSender(p->context_id)
|
||||
.SetParam1(exec_async_query_msgid),
|
||||
[] (const a8::XParams& param)
|
||||
{
|
||||
|
||||
MsgQueue::Instance()->PostMsg_r(param.param1,
|
||||
a8::XParams()
|
||||
.SetSender(param.sender)
|
||||
.SetParam1(AQE_CONN_ERROR));
|
||||
},
|
||||
&p->timer_attacher.timer_list_);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
AsyncQueryRequest* GetAsyncQueryRequest(long long seqid)
|
||||
{
|
||||
auto itr = async_query_hash.find(seqid);
|
||||
return itr != async_query_hash.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
DBThread* GetDBThread(long long hash_code)
|
||||
{
|
||||
if (db_thread_pool.empty() || hash_code < 0) {
|
||||
@ -436,10 +441,12 @@ namespace f8
|
||||
}
|
||||
|
||||
public:
|
||||
unsigned short exec_async_query_msgid = 0;
|
||||
|
||||
private:
|
||||
long long curr_seqid = 0;
|
||||
std::map<long long, AsyncQueryRequest*> async_query_hash;
|
||||
|
||||
unsigned short exec_async_query_msgid = 0;
|
||||
std::vector<DBThread*> db_thread_pool;
|
||||
};
|
||||
|
||||
@ -486,4 +493,5 @@ namespace f8
|
||||
{
|
||||
impl_->InternalExecAsyncSql(1, conn_info, querystr, args, param, on_ok, on_error, hash_code);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user