| 301 | |
| 302 | |
| 303 | void Consumer::HandleRoutineFunc(const int idx) { |
| 304 | auto &&item = impl_->items[idx]; |
| 305 | auto &&handle_result = impl_->handle_results[idx]; |
| 306 | |
| 307 | comm::ConsumerConsumeBP::GetThreadInstance()->OnHandleRoutineFunc(impl_->cc, idx); |
| 308 | |
| 309 | if (!item) { |
| 310 | QLErr("item null. idx %d", idx); |
| 311 | handle_result = comm::HandleResult::RES_ERROR; |
| 312 | return; |
| 313 | } |
| 314 | |
| 315 | if (SkipHandle(impl_->cc, *item)) { |
| 316 | comm::ConsumerConsumeBP::GetThreadInstance()->OnSkipHandle(impl_->cc, *item); |
| 317 | QLInfo("Handle skip handle_id %d ori_pub_id %d pub_id %d sub_ids %" PRIu64 " hash %" PRIu64 " uin %" PRIu64, |
| 318 | item->meta().handle_id(), item->meta().pub_id(), item->pub_id(), (uint64_t)item->sub_ids(), (uint64_t)item->meta().hash(), (uint64_t)item->meta().uin()); |
| 319 | handle_result = comm::HandleResult::RES_OK; |
| 320 | return; |
| 321 | } |
| 322 | |
| 323 | BeforeHandle(impl_->cc, *item); |
| 324 | |
| 325 | comm::RetCode ret; |
| 326 | if (comm::RetCode::RET_OK != (ret = Handle(impl_->cc, *item, handle_result))) { |
| 327 | QLErr("Handle ret %d", comm::as_integer(ret)); |
| 328 | return; |
| 329 | } |
| 330 | |
| 331 | AfterHandle(impl_->cc, *item, handle_result); |
| 332 | |
| 333 | return; |
| 334 | } |
| 335 | |
| 336 | void Consumer::BatchHandleRoutineFunc(const int idx) { |
| 337 | comm::ConsumerConsumeBP::GetThreadInstance()->OnBatchHandleRoutineFunc(impl_->cc, idx); |
nothing calls this directly
no test coverage detected