Skip to content

Commit 66b3306

Browse files
committed
graph: Update reqwest to 0.10
1 parent 1eafe65 commit 66b3306

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

graph/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ bigdecimal = { version = "0.0.14", features = ["serde"] }
88
diesel = { version = "1.4.3", features = ["postgres", "serde_json", "numeric", "r2d2"] }
99
chrono = "0.4"
1010
isatty = "0.1"
11-
reqwest = "0.9"
11+
reqwest = "0.10"
1212

1313
# graph-patches contains changes such as
1414
# https://github.com/paritytech/ethabi/pull/140, which upstream does not want
@@ -38,7 +38,7 @@ slog-envlogger = "2.1.0"
3838
slog-term = "2.4.2"
3939
petgraph = "0.4.13"
4040
tiny-keccak = "1.5.0"
41-
tokio = { version = "0.2.4", features = ["stream", "rt-threaded", "rt-util", "blocking", "time", "sync", "macros", "test-util"] }
41+
tokio = { version = "0.2.9", features = ["stream", "rt-threaded", "rt-util", "blocking", "time", "sync", "macros", "test-util"] }
4242
tokio-retry = { git = "https://github.com/graphprotocol/rust-tokio-retry", branch = "update-to-tokio-02" }
4343
url = "1.7.2"
4444
prometheus = "0.7.0"

graph/src/log/elastic.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ use std::time::Duration;
77

88
use chrono::prelude::{SecondsFormat, Utc};
99
use futures::Future;
10+
use futures03::{FutureExt, TryFutureExt};
1011
use reqwest;
11-
use reqwest::r#async::Client;
12+
use reqwest::Client;
1213
use serde::ser::Serializer as SerdeSerializer;
1314
use serde::Serialize;
1415
use serde_json::json;
@@ -272,15 +273,14 @@ impl ElasticDrain {
272273
)
273274
.body(batch_body)
274275
.send()
275-
.and_then(|response| response.error_for_status())
276+
.and_then(|response| async { response.error_for_status() })
276277
.map_err(move |e| {
277278
// Log if there was a problem sending the logs
278279
error!(
279280
logger_for_err,
280281
"Failed to send logs to Elasticsearch: {}", e
281282
);
282283
})
283-
.compat()
284284
.await;
285285
}
286286
},

0 commit comments

Comments
 (0)