MCPcopy Index your code
hub / github.com/aiscriptdev/aiscript / get_redis_connection

Function get_redis_connection

aiscript-runtime/src/lib.rs:156–166  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154}
155
156pub async fn get_redis_connection() -> Option<redis::aio::MultiplexedConnection> {
157 let config = Config::get();
158 match config.database.get_redis_url() {
159 Some(url) => {
160 let client = redis::Client::open(url).unwrap();
161 let conn = client.get_multiplexed_async_connection().await.unwrap();
162 Some(conn)
163 }
164 None => None,
165 }
166}
167
168async fn run_server(
169 path: Option<PathBuf>,

Callers 2

mainFunction · 0.85
run_serverFunction · 0.85

Calls 2

getFunction · 0.85
get_redis_urlMethod · 0.80

Tested by

no test coverage detected