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

Method ShouldSkip

phxqueue/config/topicconfig.cpp:466–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466bool TopicConfig::ShouldSkip(const comm::proto::QItem &item, const int sub_id, const int queue_info_id) const {
467 auto &&proto = GetProto();
468 for (int i{0}; i < proto.skip_infos_size(); ++i) {
469 auto &&skip_info = proto.skip_infos(i);
470 if ((skip_info.uin() == 0 || skip_info.uin() == item.meta().uin()) &&
471 (skip_info.pub_id() == -1 || skip_info.pub_id() == item.pub_id()) &&
472 (skip_info.handle_id() == -1 || skip_info.handle_id() == item.meta().handle_id()) &&
473 (skip_info.sub_id() == -1 || skip_info.sub_id() == sub_id) &&
474 (skip_info.queue_info_id() == -1 || skip_info.queue_info_id() == queue_info_id)) {
475 return true;
476 }
477 }
478 return false;
479}
480
481comm::RetCode TopicConfig::GetQueueInfoIDByCount(const int pub_id, const int cnt, int &queue_info_id) const {
482 comm::RetCode ret;

Callers 3

GetMethod · 0.80
TestTopicConfigMethod · 0.80
ProcessMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestTopicConfigMethod · 0.64