File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,9 @@ extension OptimizelyClient {
8181
8282 let interval = periodicDownloadInterval ?? 10 * 60
8383 if interval > 0 {
84+ if interval < 30 {
85+ logger? . w ( . lowPeriodicDownloadInterval)
86+ }
8487 self . datafileHandler? . setPeriodicInterval ( sdkKey: sdkKey, interval: interval)
8588 }
8689 }
Original file line number Diff line number Diff line change 11//
2- // Copyright 2019-2021, Optimizely, Inc. and contributors
2+ // Copyright 2019-2021, 2023 Optimizely, Inc. and contributors
33//
44// Licensed under the Apache License, Version 2.0 (the "License");
55// you may not use this file except in compliance with the License.
@@ -67,6 +67,7 @@ enum LogMessage {
6767 case failedToConvertMapToString
6868 case failedToAssignValue
6969 case valueForKeyNotFound( _ key: String )
70+ case lowPeriodicDownloadInterval
7071}
7172
7273extension LogMessage : CustomStringConvertible {
@@ -128,6 +129,7 @@ extension LogMessage: CustomStringConvertible {
128129 case . failedToConvertMapToString: message = " Provided map could not be converted to string. "
129130 case . failedToAssignValue: message = " Value for path could not be assigned to provided type. "
130131 case . valueForKeyNotFound( let key) : message = " Value for JSON key ( \( key) ) not found. "
132+ case . lowPeriodicDownloadInterval: message = " Polling intervals below 30 seconds are not recommended. "
131133 }
132134
133135 return message
You can’t perform that action at this time.
0 commit comments