From 46bc57996672a16d4210c973da9dbc0957369a05 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Tue, 5 Nov 2024 18:33:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E7=9A=84=E9=87=8D=E8=AF=95=E6=9C=BA=E5=88=B6=E5=BD=B1=E5=93=8D?= =?UTF-8?q?=E6=80=A7=E8=83=BD=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/queue/ApiExecutionQueueService.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/queue/ApiExecutionQueueService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/queue/ApiExecutionQueueService.java index 4380799eb8..606c947ac1 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/queue/ApiExecutionQueueService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/queue/ApiExecutionQueueService.java @@ -55,21 +55,6 @@ public class ApiExecutionQueueService { String queueKey = QUEUE_DETAIL_PREFIX + queueId; ListOperations listOps = stringRedisTemplate.opsForList(); String queueDetail = listOps.leftPop(queueKey); - if (StringUtils.isBlank(queueDetail)) { - // 重试3次获取 - for (int i = 0; i < 3; i++) { - queueDetail = stringRedisTemplate.opsForList().leftPop(queueKey); - if (StringUtils.isNotBlank(queueDetail)) { - break; - } - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - } - if (StringUtils.isNotBlank(queueDetail)) { Long size = size(queueId); if (size == null || size == 0) {