Merge pull request 'timeout added' (#29) from feature/135 into rc
test-org/integration-module/pipeline/pr-master Build succeeded
test-org/integration-module/pipeline/pr-master Build succeeded
Reviewed-on: http://git.enode/deployer3000/integration-module/pulls/29pull/30/head
commit
f1868cd300
|
|
@ -37,6 +37,7 @@ impl Requester {
|
||||||
pub async fn get_conferences(&self) -> anyhow::Result<Value> {
|
pub async fn get_conferences(&self) -> anyhow::Result<Value> {
|
||||||
let url = format!("{}{}", self.base, *CONFERENCES_ENDPOINT);
|
let url = format!("{}{}", self.base, *CONFERENCES_ENDPOINT);
|
||||||
let req = self.client.get(url)
|
let req = self.client.get(url)
|
||||||
|
.timeout(tokio::time::Duration::from_secs(10))
|
||||||
.header("accept", "application/json")
|
.header("accept", "application/json")
|
||||||
.header("x-api-key", &self.api_key);
|
.header("x-api-key", &self.api_key);
|
||||||
let resp = req.send().await;
|
let resp = req.send().await;
|
||||||
|
|
@ -83,6 +84,7 @@ impl Requester {
|
||||||
for conf in conferences {
|
for conf in conferences {
|
||||||
let url = format!("{}{}{}", self.base, *USERS_ENDPOINT, &conf.1);
|
let url = format!("{}{}{}", self.base, *USERS_ENDPOINT, &conf.1);
|
||||||
let req = self.client.get(url)
|
let req = self.client.get(url)
|
||||||
|
.timeout(tokio::time::Duration::from_secs(10))
|
||||||
.header("accept", "application/json")
|
.header("accept", "application/json")
|
||||||
.header("x-api-key", &self.api_key);
|
.header("x-api-key", &self.api_key);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue