From 9aff0692ae0510117275fdc6a367e55d46d3b628 Mon Sep 17 00:00:00 2001 From: Dmytro Shvaika Date: Fri, 4 Sep 2020 15:47:11 +0300 Subject: [PATCH] clean up code --- .../processing/TbRuleEngineProcessingStrategyFactory.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/src/main/java/org/thingsboard/server/service/queue/processing/TbRuleEngineProcessingStrategyFactory.java b/application/src/main/java/org/thingsboard/server/service/queue/processing/TbRuleEngineProcessingStrategyFactory.java index e63b0cef8e..245d02bf5d 100644 --- a/application/src/main/java/org/thingsboard/server/service/queue/processing/TbRuleEngineProcessingStrategyFactory.java +++ b/application/src/main/java/org/thingsboard/server/service/queue/processing/TbRuleEngineProcessingStrategyFactory.java @@ -114,10 +114,8 @@ public class TbRuleEngineProcessingStrategyFactory { } catch (InterruptedException e) { throw new RuntimeException(e); } - if (multiplyPauseBetweenRetries && maxPauseBetweenRetries > 0) { - if (pauseBetweenRetries != maxPauseBetweenRetries) { - pauseBetweenRetries = Math.min(maxPauseBetweenRetries, pauseBetweenRetries * pauseBetweenRetries); - } + if (multiplyPauseBetweenRetries && maxPauseBetweenRetries > pauseBetweenRetries) { + pauseBetweenRetries = Math.min(maxPauseBetweenRetries, pauseBetweenRetries * 2); } } return new TbRuleEngineProcessingDecision(false, toReprocess);