From 85512a248d62fed1dbca6a04ef5c6ccd576cac23 Mon Sep 17 00:00:00 2001 From: Matjaz Pirnovar Date: Mon, 25 Sep 2023 13:47:39 -0700 Subject: [PATCH] [FSSDK-9509] Update http_project_config_manager.rb with soft log warning about polling interval < 30s (#338) * Update http_project_config_manager.rb Add soft warning that polling interval under 30 s is not recommended. * Update w single quotes * Update http_project_config_manager.rb * Update WARNING to WARN * Update lib/optimizely/config_manager/http_project_config_manager.rb Co-authored-by: Andy Leap <104936100+andrewleap-optimizely@users.noreply.github.com> --------- Co-authored-by: Andy Leap <104936100+andrewleap-optimizely@users.noreply.github.com> --- .../config_manager/http_project_config_manager.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/optimizely/config_manager/http_project_config_manager.rb b/lib/optimizely/config_manager/http_project_config_manager.rb index 0da73c1f..91610455 100644 --- a/lib/optimizely/config_manager/http_project_config_manager.rb +++ b/lib/optimizely/config_manager/http_project_config_manager.rb @@ -268,6 +268,13 @@ def polling_interval(polling_interval) return end + if polling_interval < 30 + @logger.log( + Logger::WARN, + 'Polling intervals below 30 seconds are not recommended.' + ) + end + @polling_interval = polling_interval end