From 534cb508c84b751d4b74585b66088ce39f981932 Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser <23085769+hiddenalpha@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:03:05 +0100 Subject: [PATCH] [SDCISA-13736, SDCISA-10974] Apply off-topic changes This applies some (unrelated) changes requested in https://github.com/swisspost/gateleen/pull/546 . --- .../swisspush/gateleen/core/lua/LuaScriptState.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java b/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java index 8a4f9521..4fba8b32 100644 --- a/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java +++ b/gateleen-core/src/main/java/org/swisspush/gateleen/core/lua/LuaScriptState.java @@ -97,15 +97,15 @@ public void loadLuaScript(final RedisCommand redisCommand, int executionCounter) log.debug("RedisStorage script already exists in redis cache: {}", luaScriptType); redisCommand.exec(executionCounterIncr); } else { - log.info("load lua script for script type: {} logutput: {}", luaScriptType, logoutput); + log.info("loading lua script for script type: {} log output: {}", luaScriptType, logoutput); redisAPI.script(Arrays.asList("load",script), stringAsyncResult -> { - String newSha = stringAsyncResult.result().toString(); - log.info("got sha from redis for lua script: {}: {}", luaScriptType, newSha); - if (!newSha.equals(sha)) { + String redisSha = stringAsyncResult.result().toString(); + log.info("got sha from redis for lua script: {}: {}", luaScriptType, redisSha); + if (!redisSha.equals(sha)) { log.warn("the sha calculated by myself: {} doesn't match with the sha from redis: {}. " + - "We use the sha from redis", sha, newSha); + "We use the sha from redis", sha, redisSha); } - sha = newSha; + sha = redisSha; log.info("execute redis command for script type: {} with new sha: {}", luaScriptType, sha); redisCommand.exec(executionCounterIncr); });