Commit 548a52f7 by Demid Merzlyakov

Shorter update period for debug build per Ritesh's request.

parent f5b2e890
...@@ -28,8 +28,11 @@ public class BlendHealthSource: HealthSource { ...@@ -28,8 +28,11 @@ public class BlendHealthSource: HealthSource {
} }
private static let blendAPIKeyHeaderName = "blend-api-key" private static let blendAPIKeyHeaderName = "blend-api-key"
private static let blendAPIKey = "0imfnc8mVLWwsAawjYr4Rx-Af50DDqtlx" private static let blendAPIKey = "0imfnc8mVLWwsAawjYr4Rx-Af50DDqtlx"
#if DEBUG
public var healthUpdateInterval: TimeInterval = TimeInterval(2 * 60) // 2 minutes
#else
public var healthUpdateInterval: TimeInterval = TimeInterval(15 * 60) // 15 minutes public var healthUpdateInterval: TimeInterval = TimeInterval(15 * 60) // 15 minutes
#endif
/// This queue is needed to synchronize access to locationsBeingUpdated. Also, to make logging more clear. /// This queue is needed to synchronize access to locationsBeingUpdated. Also, to make logging more clear.
private let internalQueue: OperationQueue = { private let internalQueue: OperationQueue = {
let queue = OperationQueue() let queue = OperationQueue()
......
...@@ -32,8 +32,11 @@ public class WdtWeatherSource: WeatherSource { ...@@ -32,8 +32,11 @@ public class WdtWeatherSource: WeatherSource {
}() }()
private var locationsBeingUpdated = Set<Location>() private var locationsBeingUpdated = Set<Location>()
#if DEBUG
public let weatherUpdateInterval = TimeInterval(2 * 60) // 2 minutes
#else
public let weatherUpdateInterval = TimeInterval(15 * 60) // 15 minutes public let weatherUpdateInterval = TimeInterval(15 * 60) // 15 minutes
#endif
public func updateWeather(for location: Location, type: WeatherUpdateType, completion: @escaping WeatherSourceCompletion) { public func updateWeather(for location: Location, type: WeatherUpdateType, completion: @escaping WeatherSourceCompletion) {
internalQueue.addOperation { [weak self] in internalQueue.addOperation { [weak self] in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment