mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 20:26:52 +00:00
refactor: Rename "synapse"-related federation methods to "slow"
I won't even comment on how stupid that naming was.
This commit is contained in:
4 files changed
+8
-11
No files matched your search
@@ -13,7 +13,7 @@ pub struct Service {
|
||||
pub extern_media: reqwest::Client,
|
||||
pub well_known: reqwest::Client,
|
||||
pub federation: reqwest::Client,
|
||||
pub synapse: reqwest::Client,
|
||||
pub federation_slow: reqwest::Client,
|
||||
pub sender: reqwest::Client,
|
||||
pub appservice: reqwest::Client,
|
||||
pub pusher: reqwest::Client,
|
||||
@@ -85,7 +85,7 @@ impl crate::Service for Service {
|
||||
.redirect(redirect::Policy::limited(3))
|
||||
.build()?,
|
||||
|
||||
synapse: base(config)?
|
||||
federation_slow: base(config)?
|
||||
.dns_resolver(resolver.resolver.hooked.clone())
|
||||
.connect_timeout(Duration::from_secs(config.federation_conn_timeout))
|
||||
.read_timeout(Duration::from_secs(config.federation_timeout.saturating_mul(6)))
|
||||
|
||||
@@ -39,8 +39,8 @@ impl super::Service {
|
||||
}
|
||||
|
||||
/// Like execute() but with a very large timeout
|
||||
#[tracing::instrument(skip_all, name = "synapse", level = "debug")]
|
||||
pub async fn execute_synapse<'i, T>(
|
||||
#[tracing::instrument(skip_all, name = "request_slow", level = "debug")]
|
||||
pub async fn execute_slow<'i, T>(
|
||||
&self,
|
||||
dest: &ServerName,
|
||||
request: T,
|
||||
@@ -52,7 +52,7 @@ impl super::Service {
|
||||
> + Debug
|
||||
+ Send,
|
||||
{
|
||||
let client = &self.services.client.synapse;
|
||||
let client = &self.services.client.federation_slow;
|
||||
self.execute_signed(client, dest, request).await
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ impl Service {
|
||||
let send_join_response = match self
|
||||
.services
|
||||
.sending
|
||||
.send_synapse_request(&remote_server, send_join_request)
|
||||
.send_slow_federation_request(&remote_server, send_join_request)
|
||||
.await
|
||||
{
|
||||
| Ok(response) => response,
|
||||
|
||||
@@ -311,7 +311,7 @@ impl Service {
|
||||
|
||||
/// Like send_federation_request() but with a very large timeout
|
||||
#[inline]
|
||||
pub async fn send_synapse_request<'i, T>(
|
||||
pub async fn send_slow_federation_request<'i, T>(
|
||||
&self,
|
||||
dest: &ServerName,
|
||||
request: T,
|
||||
@@ -323,10 +323,7 @@ impl Service {
|
||||
> + Debug
|
||||
+ Send,
|
||||
{
|
||||
self.services
|
||||
.federation
|
||||
.execute_synapse(dest, request)
|
||||
.await
|
||||
self.services.federation.execute_slow(dest, request).await
|
||||
}
|
||||
|
||||
/// Send an unauthenticated federation request with no X-Matrix header.
|
||||
|
||||
Reference in new issue
Block a user