Working on metars, updating ui drawer
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
use crate::error::ApiResult;
|
||||
use redis::{Client as RedisClient, aio::MultiplexedConnection as RedisConnection, RedisResult};
|
||||
use redis::{
|
||||
Client as RedisClient, aio::MultiplexedConnection as RedisConnection, RedisResult,
|
||||
};
|
||||
use s3::{Bucket, Region, creds::Credentials, BucketConfiguration, request::ResponseData};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::sync::OnceLock;
|
||||
@@ -129,10 +131,10 @@ fn redis() -> &'static RedisClient {
|
||||
REDIS.get().unwrap()
|
||||
}
|
||||
|
||||
pub fn redis_connection() -> RedisResult<redis::Connection> {
|
||||
let conn = redis().get_connection()?;
|
||||
Ok(conn)
|
||||
}
|
||||
// pub fn redis_connection() -> RedisResult<redis::Connection> {
|
||||
// let conn = redis().get_connection()?;
|
||||
// Ok(conn)
|
||||
// }
|
||||
|
||||
pub async fn redis_async_connection() -> RedisResult<RedisConnection> {
|
||||
let conn = redis().get_multiplexed_async_connection().await?;
|
||||
|
||||
Reference in New Issue
Block a user