Browse Source

clean up code

pull/3406/head
Dmytro Shvaika 6 years ago
parent
commit
3ceb9d3101
  1. 6
      application/src/main/java/org/thingsboard/server/service/queue/processing/TbRuleEngineProcessingStrategyFactory.java

6
application/src/main/java/org/thingsboard/server/service/queue/processing/TbRuleEngineProcessingStrategyFactory.java

@ -114,10 +114,8 @@ public class TbRuleEngineProcessingStrategyFactory {
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if (multiplyPauseBetweenRetries && maxPauseBetweenRetries > 0) { if (multiplyPauseBetweenRetries && maxPauseBetweenRetries > pauseBetweenRetries) {
if (pauseBetweenRetries != maxPauseBetweenRetries) { pauseBetweenRetries = Math.min(maxPauseBetweenRetries, pauseBetweenRetries * 2);
pauseBetweenRetries = Math.min(maxPauseBetweenRetries, pauseBetweenRetries * pauseBetweenRetries);
}
} }
} }
return new TbRuleEngineProcessingDecision(false, toReprocess); return new TbRuleEngineProcessingDecision(false, toReprocess);

Loading…
Cancel
Save