From fec58a5ecaca0f749abcdf076f13d6f0ba6267b2 Mon Sep 17 00:00:00 2001 From: imalasong <55082705+imalasong@users.noreply.github.com> Date: Mon, 30 Oct 2023 18:19:15 +0800 Subject: [PATCH] refactor: Remove redundant LISTENING CONFIGS parameter names (#1503) Co-authored-by: xiaochangbai <704566072@qq.com> --- .../src/main/java/cn/hippo4j/common/constant/Constants.java | 2 -- .../java/cn/hippo4j/springboot/starter/core/ClientWorker.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/infra/common/src/main/java/cn/hippo4j/common/constant/Constants.java b/infra/common/src/main/java/cn/hippo4j/common/constant/Constants.java index 06de3506..876197d2 100644 --- a/infra/common/src/main/java/cn/hippo4j/common/constant/Constants.java +++ b/infra/common/src/main/java/cn/hippo4j/common/constant/Constants.java @@ -78,8 +78,6 @@ public class Constants { public static final String HEALTH_CHECK_PATH = BASE_PATH + "/health/check"; - public static final String PROBE_MODIFY_REQUEST = "Listening-Configs"; - public static final String LONG_PULLING_TIMEOUT = "Long-Pulling-Timeout"; public static final String LONG_PULLING_TIMEOUT_NO_HANGUP = "Long-Pulling-Timeout-No-Hangup"; diff --git a/starters/threadpool/server/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java b/starters/threadpool/server/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java index a75a7f6a..725fa900 100644 --- a/starters/threadpool/server/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java +++ b/starters/threadpool/server/src/main/java/cn/hippo4j/springboot/starter/core/ClientWorker.java @@ -48,7 +48,7 @@ import static cn.hippo4j.common.constant.Constants.CONFIG_LONG_POLL_TIMEOUT; import static cn.hippo4j.common.constant.Constants.GROUP_KEY_DELIMITER_TRANSLATION; import static cn.hippo4j.common.constant.Constants.WORD_SEPARATOR; import static cn.hippo4j.common.constant.Constants.LINE_SEPARATOR; -import static cn.hippo4j.common.constant.Constants.PROBE_MODIFY_REQUEST; +import static cn.hippo4j.common.constant.Constants.LISTENING_CONFIGS; import static cn.hippo4j.common.constant.Constants.WEIGHT_CONFIGS; import static cn.hippo4j.common.constant.Constants.LONG_PULLING_TIMEOUT; import static cn.hippo4j.common.constant.Constants.LONG_PULLING_CLIENT_IDENTIFICATION; @@ -195,7 +195,7 @@ public class ClientWorker implements DisposableBean { return Collections.emptyList(); } Map params = new HashMap<>(2); - params.put(PROBE_MODIFY_REQUEST, probeUpdateString); + params.put(LISTENING_CONFIGS, probeUpdateString); params.put(WEIGHT_CONFIGS, IdUtil.simpleUUID()); Map headers = new HashMap<>(2); headers.put(LONG_PULLING_TIMEOUT, "" + timeout);