fix: Remove connection caching (no Clone)
Some checks failed
BotServer CI / build (push) Failing after 41s
Some checks failed
BotServer CI / build (push) Failing after 41s
This commit is contained in:
parent
b3ce293487
commit
9d6c2686f1
1 changed files with 1 additions and 8 deletions
|
|
@ -20,14 +20,7 @@ fn get_redis_connection(cache_client: &Arc<redis::Client>) -> Option<redis::Conn
|
|||
}
|
||||
|
||||
let timeout = Duration::from_millis(50);
|
||||
if let Ok(conn) = cache_client.get_connection_with_timeout(timeout) {
|
||||
if let Ok(mut guard) = REDIS_CONN.lock() {
|
||||
*guard = Some(conn.clone());
|
||||
}
|
||||
Some(conn)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
cache_client.get_connection_with_timeout(timeout).ok()
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue