We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee29b7b commit b6346a4Copy full SHA for b6346a4
Sources/App/configure.swift
@@ -81,6 +81,13 @@ public func configure(_ app: Application) async throws -> String {
81
// Setup Redis connection
82
do {
83
app.redis.configuration = try RedisConfiguration(hostname: "redis")
84
+ do { // write-read test across nodes
85
+ let key = "startup-time-\(app.http.server.configuration.hostname)"
86
+ try await app.redis.set(.init(key), to: "\(Date.now)").get()
87
+ if let value = try await app.redis.get(.init(key), as: String.self).get() {
88
+ app.logger.info("Redis set/get result: \(value)")
89
+ }
90
91
} catch {
92
app.logger.warning("Failed to configure Redis, caching disabled. Error: \(error)")
93
}
0 commit comments