MCPcopy Create free account
hub / github.com/Tencent/phxqueue / GetPendingQueues

Method GetPendingQueues

phxqueue/consumer/hblock.cpp:526–538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526comm::RetCode HeartBeatLock::GetPendingQueues(const vector<Queue_t> &all_queues, const AddrScales &addr_scales, vector<Queue_t> &pending_queues) {
527 comm::RetCode ret;
528 set<size_t> queue_idxs;
529 if (comm::RetCode::RET_OK != (ret = impl_->consumer->GetQueueByAddrScale(all_queues, addr_scales, queue_idxs))) {
530 QLErr("ERR: GetQueueByAddrScale ret %d", comm::as_integer(ret));
531 return ret;
532 }
533 for (auto &&idx : queue_idxs) {
534 pending_queues.push_back(all_queues[idx]);
535 QLVerb("add into pending_queues. idx %d", idx);
536 }
537 return comm::RetCode::RET_OK;
538}
539
540void HeartBeatLock::UpdateProcUsed() {
541 int proc_used = 0;

Callers

nothing calls this directly

Calls 2

as_integerFunction · 0.85
GetQueueByAddrScaleMethod · 0.45

Tested by

no test coverage detected