Removed maxAllowedScheduledUpdateIntervalInSecForCF from tenantProfileConfiguration
This commit is contained in:
		
							parent
							
								
									ad511e9355
								
							
						
					
					
						commit
						bf83848076
					
				@ -174,8 +174,6 @@ public class DefaultTenantProfileConfiguration implements TenantProfileConfigura
 | 
				
			|||||||
    private long maxArgumentsPerCF = 10;
 | 
					    private long maxArgumentsPerCF = 10;
 | 
				
			||||||
    @Schema(example = "3600")
 | 
					    @Schema(example = "3600")
 | 
				
			||||||
    private int minAllowedScheduledUpdateIntervalInSecForCF = 3600;
 | 
					    private int minAllowedScheduledUpdateIntervalInSecForCF = 3600;
 | 
				
			||||||
    @Schema(example = "86400")
 | 
					 | 
				
			||||||
    private int maxAllowedScheduledUpdateIntervalInSecForCF = 86400;
 | 
					 | 
				
			||||||
    @Builder.Default
 | 
					    @Builder.Default
 | 
				
			||||||
    @Min(value = 1, message = "must be at least 1")
 | 
					    @Min(value = 1, message = "must be at least 1")
 | 
				
			||||||
    @Schema(example = "1000")
 | 
					    @Schema(example = "1000")
 | 
				
			||||||
 | 
				
			|||||||
@ -97,10 +97,10 @@ public class BaseCalculatedFieldService extends AbstractEntityService implements
 | 
				
			|||||||
        if (!configuration.isScheduledUpdateEnabled()) {
 | 
					        if (!configuration.isScheduledUpdateEnabled()) {
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        var defaultProfileConfiguration = tbTenantProfileCache.get(calculatedField.getTenantId()).getDefaultProfileConfiguration();
 | 
					        int tenantProfileMinAllowedValue = tbTenantProfileCache.get(calculatedField.getTenantId())
 | 
				
			||||||
        int min = defaultProfileConfiguration.getMinAllowedScheduledUpdateIntervalInSecForCF();
 | 
					                .getDefaultProfileConfiguration()
 | 
				
			||||||
        int max = defaultProfileConfiguration.getMaxAllowedScheduledUpdateIntervalInSecForCF();
 | 
					                .getMinAllowedScheduledUpdateIntervalInSecForCF();
 | 
				
			||||||
        configuration.setScheduledUpdateIntervalSec(Math.max(min, Math.min(configuration.getScheduledUpdateIntervalSec(), max)));
 | 
					        configuration.setScheduledUpdateIntervalSec(Math.max(configuration.getScheduledUpdateIntervalSec(), tenantProfileMinAllowedValue));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user