| 105 | |
| 106 | |
| 107 | void 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 | |
| 121 | void BatchTask::AddTask(shared_ptr<Task> task) { |
no test coverage detected