mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-07 15:12:14 +08:00
fix: 修复 Consume 点击 Stop 后未停止请求发送的问题
This commit is contained in:
@@ -178,7 +178,7 @@ const ConsumeClientTest = () => {
|
||||
partitionProcessRef.current = processList;
|
||||
|
||||
curPartitionList.current = _partitionList;
|
||||
|
||||
if (!isStopStatus.current) {
|
||||
switch (until) {
|
||||
case 'timestamp':
|
||||
setIsStop(currentTime >= untilDate);
|
||||
@@ -192,10 +192,8 @@ const ConsumeClientTest = () => {
|
||||
// 过滤出消费数量不足设定值的partition
|
||||
const filtersPartition = _partitionList.filter((item: any) => item.recordCount < untilMsgNum);
|
||||
curPartitionList.current = filtersPartition; // 用作下一次请求的入参
|
||||
if (!isStop) {
|
||||
setIsStop(filtersPartition.length < 1);
|
||||
isStopStatus.current = filtersPartition.length < 1;
|
||||
}
|
||||
break;
|
||||
case 'max size':
|
||||
setIsStop(+recordSizeCur.current >= unitMsgSize);
|
||||
@@ -204,13 +202,12 @@ const ConsumeClientTest = () => {
|
||||
case 'max size per partition':
|
||||
// 过滤出消费size不足设定值的partition
|
||||
const filters = partitionConsumedList.filter((item: any) => item.recordSizeUnitB < unitMsgSize);
|
||||
if (!isStop) {
|
||||
setIsStop(filters.length < 1);
|
||||
isStopStatus.current = filters.length < 1;
|
||||
}
|
||||
curPartitionList.current = filters;
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const runClientConsumer = (values: any, params: any = {}, isFirst = false) => {
|
||||
|
||||
Reference in New Issue
Block a user