Commit 8915dd16 authored by Aljaž Srebrnič's avatar Aljaž Srebrnič

Add smaller connection timeout

parent 1e40b6d7
use std::time::Duration;
extern crate spaceapi_server;
extern crate env_logger;
extern crate r2d2_redis;
......@@ -96,6 +98,7 @@ fn main() {
let redis_connstring = var("REDIS_CONNSTRING").unwrap_or(String::from("redis://localhost"));
let manager = RedisConnectionManager::new(&*redis_connstring).unwrap();
let pool = RedisPool::builder()
.connection_timeout(Duration::from_secs(1))
.build(manager)
.unwrap();
......
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