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

Method Init

phxqueue/producer/batchhelper.cpp:107–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105
106
107void BatchTask::Init() {
108 comm::RetCode ret;
109 shared_ptr<const config::TopicConfig> topic_config;
110 if (comm::RetCode::RET_OK != (ret = config::GlobalConfig::GetThreadInstance()->GetTopicConfigByTopicID(topic_id_, topic_config))) {
111 QLErr("GetTopicConfigByTopicID ret %d", as_integer(ret));
112 return;
113 }
114
115 items_byte_size_limit_ = topic_config->GetProto().topic().items_byte_size_limit();
116 batch_limit_ = topic_config->GetProto().topic().batch_limit();
117 producer_batch_delay_time_ms_ = topic_config->GetProto().topic().producer_batch_delay_time_ms();
118}
119
120
121void BatchTask::AddTask(shared_ptr<Task> task) {

Callers 1

BatchRawAddMethod · 0.45

Calls 3

as_integerFunction · 0.85
GetProducerOptionMethod · 0.80

Tested by

no test coverage detected