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

Function get_async_redis_conn

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

Source from the content-addressed store, hash-verified

159}
160
161pub async fn get_async_redis_conn() -> Result<AsyncRedisPoolConnection> {
162 let pool = get_async_redis_pool().await?;
163
164 let start = Instant::now();
165 let res = match pool {
166 AsyncRedisPool::Client(v) => AsyncRedisPoolConnection::Client(v.get().await?),
167 AsyncRedisPool::ClusterClient(v) => {
168 AsyncRedisPoolConnection::ClusterClient(v.clone().get().await?)
169 }
170 };
171
172 STORAGE_REDIS_CONN_GET.observe(start.elapsed().as_secs_f64());
173
174 Ok(res)
175}
176
177pub async fn run_db_migrations() -> Result<()> {
178 info!("Applying schema migrations");

Callers 15

assert_replyFunction · 0.85
saveFunction · 0.85
getFunction · 0.85
deleteFunction · 0.85
reset_redisFunction · 0.85
save_stateFunction · 0.85
saveFunction · 0.85
get_stateFunction · 0.85
getFunction · 0.85
get_rx_infoFunction · 0.85

Calls 3

get_async_redis_poolFunction · 0.85
ClientClass · 0.85
getMethod · 0.45

Tested by 3

uplink_meta_logFunction · 0.68
device_uplink_frame_logFunction · 0.68
test_log_requestFunction · 0.68