File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,4 @@ futures = { version = "0.3.1", features = ["compat"] }
32
32
33
33
[dev-dependencies ]
34
34
byteorder = " 1.3"
35
- tokio = { version = " 0.2" , features = [" macros" , " rt-core " ] }
35
+ tokio = { version = " 0.2" , features = [" macros" , " rt-threaded " ] }
Original file line number Diff line number Diff line change @@ -16,13 +16,13 @@ hex = "0.3.2"
16
16
# CLI
17
17
clap = " 2.33.0"
18
18
# Server
19
- tokio = { version = " 0.2.9" , features = [" macros" , " rt-core " ] }
19
+ tokio = { version = " 0.2.9" , features = [" macros" , " rt-threaded " ] }
20
20
hyper = { version = " 0.13" , features = [" stream" ] }
21
21
regex = " 1"
22
22
# Database
23
- redis = { version = " 0.14 " , features = [ " tokio-rt-core " ] }
24
- bb8 = { git = " https://github.com/khuey/bb8 " }
25
- bb8-postgres = { git = " https://github.com/khuey/bb8 " , features = [" with-chrono-0_4" , " with-serde_json-1" ] }
23
+ redis = " 0.15 "
24
+ bb8 = " 0.4 "
25
+ bb8-postgres = { version = " 0.4 " , features = [" with-chrono-0_4" , " with-serde_json-1" ] }
26
26
27
27
# Migrations
28
28
migrant_lib = { version = " 0.27" , features = [" d-postgres" ] }
Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ lazy_static! {
36
36
37
37
pub async fn redis_connection ( ) -> Result < MultiplexedConnection , RedisError > {
38
38
let client = redis:: Client :: open ( REDIS_URL . as_str ( ) ) . expect ( "Wrong redis connection url" ) ;
39
- client. get_multiplexed_tokio_connection ( ) . await
39
+ let ( connection, driver) = client. get_multiplexed_async_connection ( ) . await ?;
40
+ tokio:: spawn ( driver) ;
41
+ Ok ( connection)
40
42
}
41
43
42
44
pub async fn postgres_connection ( ) -> Result < DbPool , bb8_postgres:: tokio_postgres:: Error > {
You can’t perform that action at this time.
0 commit comments