Merge remote-tracking branch 'origin/main' into ap07

This commit is contained in:
Kitaiti Makoto
2022-05-06 12:38:47 +09:00
12 changed files with 81 additions and 59 deletions
+2 -2
View File
@@ -9,12 +9,12 @@ array_tool = "1.0"
base64 = "0.13"
heck = "0.4.0"
hex = "0.4"
openssl = "0.10.22"
openssl = "0.10.40"
rocket = "0.4.6"
reqwest = { version = "0.11.10", features = ["blocking", "json", "socks"] }
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0.80"
serde_json = "1.0.81"
shrinkwraprs = "0.3.0"
syntect = "4.5.0"
regex-syntax = { version = "0.6.17", default-features = false, features = ["unicode-perl"] }
+4 -1
View File
@@ -157,6 +157,9 @@ where
.build()
.expect("Error while initializing tokio runtime for federation");
rt.block_on(async {
// TODO: should be determined dependent on database connections because
// after broadcasting, target instance sends request to this instance,
// and Plume accesses database at that time.
let capacity = 6;
let (tx, rx) = flume::bounded::<RequestBuilder>(capacity);
let mut handles = Vec::with_capacity(capacity);
@@ -206,7 +209,7 @@ where
.expect("activity_pub::broadcast: request signature error"),
);
let request_builder = client.post(&inbox).headers(headers.clone()).body(body);
tx.send_async(request_builder).await.unwrap();
let _ = tx.send_async(request_builder).await;
}
drop(tx);
join_all(handles).await;