Skip to content

Commit e984f60

Browse files
authored
Merge pull request #285 from AdExNetwork/multi-core-and-update-deps
update deps & multi core (tokio)
2 parents a53bdd9 + 84c8ec0 commit e984f60

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

adapter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ futures = { version = "0.3.1", features = ["compat"] }
3232

3333
[dev-dependencies]
3434
byteorder = "1.3"
35-
tokio = { version = "0.2", features = ["macros", "rt-core"] }
35+
tokio = { version = "0.2", features = ["macros", "rt-threaded"] }

sentry/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ hex = "0.3.2"
1616
# CLI
1717
clap = "2.33.0"
1818
# Server
19-
tokio = { version = "0.2.9", features = ["macros", "rt-core"] }
19+
tokio = { version = "0.2.9", features = ["macros", "rt-threaded"] }
2020
hyper = { version = "0.13", features = ["stream"] }
2121
regex = "1"
2222
# 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"] }
2626

2727
# Migrations
2828
migrant_lib = { version = "0.27", features = ["d-postgres"] }

sentry/src/db.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ lazy_static! {
3636

3737
pub async fn redis_connection() -> Result<MultiplexedConnection, RedisError> {
3838
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)
4042
}
4143

4244
pub async fn postgres_connection() -> Result<DbPool, bb8_postgres::tokio_postgres::Error> {

0 commit comments

Comments
 (0)