MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / get_async_redis_pool

Function get_async_redis_pool

chirpstack/src/storage/mod.rs:152–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}
151
152async fn get_async_redis_pool() -> Result<AsyncRedisPool> {
153 let pool_r = ASYNC_REDIS_POOL.read().await;
154 let pool: AsyncRedisPool = pool_r
155 .as_ref()
156 .ok_or_else(|| anyhow!("Redis connection pool is not initialized"))?
157 .clone();
158 Ok(pool)
159}
160
161pub async fn get_async_redis_conn() -> Result<AsyncRedisPoolConnection> {
162 let pool = get_async_redis_pool().await?;

Callers 1

get_async_redis_connFunction · 0.85

Calls 1

as_refMethod · 0.80

Tested by

no test coverage detected