added validation for the debugAllUntil
This commit is contained in:
parent
637fe2a258
commit
7495861080
@ -229,9 +229,13 @@ public class BaseRuleChainService extends AbstractEntityService implements RuleC
|
|||||||
node.setRuleChainId(ruleChainId);
|
node.setRuleChainId(ruleChainId);
|
||||||
node = ruleNodeUpdater.apply(node);
|
node = ruleNodeUpdater.apply(node);
|
||||||
|
|
||||||
|
int debugDuration = tbTenantProfileCache.get(tenantId).getDefaultProfileConfiguration().getMaxRuleNodeDebugModeDurationMinutes(maxRuleNodeDebugModeDurationMinutes);
|
||||||
|
long debugUntil = now + TimeUnit.MINUTES.toMillis(debugDuration);
|
||||||
|
|
||||||
if (node.isDebugAll()) {
|
if (node.isDebugAll()) {
|
||||||
int debugDuration = tbTenantProfileCache.get(tenantId).getDefaultProfileConfiguration().getMaxRuleNodeDebugModeDurationMinutes(maxRuleNodeDebugModeDurationMinutes);
|
node.setDebugAllUntil(debugUntil);
|
||||||
node.setDebugAllUntil(now + TimeUnit.MINUTES.toMillis(debugDuration));
|
} else if (node.getDebugAllUntil() > debugUntil) {
|
||||||
|
throw new DataValidationException("Unable to update 'debugAllUntil' property. To reset the debug duration, please modify the 'debugAll' property instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
RuleChainDataValidator.validateRuleNode(node);
|
RuleChainDataValidator.validateRuleNode(node);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user