REQ-2481: 抽出方法
This commit is contained in:
parent
ceb3eb6bbe
commit
b3b2501d16
@ -66,6 +66,7 @@ public class SendQueue {
|
||||
// 绝对的优先级优先
|
||||
if (!cfg.isMemoryQueuedMaxBatchFirst())
|
||||
return pollBatchFIFO(batchSize);
|
||||
// 批量最大的优先, 不要浪费批量接口的流量
|
||||
return pollQueuedMaxBatch(batchSize);
|
||||
}
|
||||
|
||||
@ -86,7 +87,6 @@ public class SendQueue {
|
||||
}
|
||||
|
||||
private List<MessageHistory> pollQueuedMaxBatch(int batchSize) {
|
||||
// 批量最大的优先, 不要浪费批量接口的流量
|
||||
List<Record> perfectRecords = determineQueuedMaxBatch();
|
||||
// 如果没有真正的批量, 就退回到按优先级顺序发送
|
||||
if (perfectRecords.size() <= 1) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user