mirror of
https://github.com/LemmyNet/activitypub-federation-rust
synced 2024-11-27 13:51:29 +00:00
Rename http_fetch_retry_limit to http_fetch_limit (was misleading) (#10)
This commit is contained in:
parent
9332c81458
commit
d97ff5cee5
2 changed files with 2 additions and 2 deletions
|
@ -97,7 +97,7 @@ clone_trait_object!(UrlVerifier);
|
||||||
pub struct InstanceSettings {
|
pub struct InstanceSettings {
|
||||||
/// Maximum number of outgoing HTTP requests per incoming activity
|
/// Maximum number of outgoing HTTP requests per incoming activity
|
||||||
#[builder(default = "20")]
|
#[builder(default = "20")]
|
||||||
http_fetch_retry_limit: i32,
|
http_fetch_limit: i32,
|
||||||
/// Number of worker threads for sending outgoing activities
|
/// Number of worker threads for sending outgoing activities
|
||||||
#[builder(default = "64")]
|
#[builder(default = "64")]
|
||||||
worker_count: u64,
|
worker_count: u64,
|
||||||
|
|
|
@ -16,7 +16,7 @@ pub async fn fetch_object_http<Kind: DeserializeOwned>(
|
||||||
info!("Fetching remote object {}", url.to_string());
|
info!("Fetching remote object {}", url.to_string());
|
||||||
|
|
||||||
*request_counter += 1;
|
*request_counter += 1;
|
||||||
if *request_counter > instance.settings.http_fetch_retry_limit {
|
if *request_counter > instance.settings.http_fetch_limit {
|
||||||
return Err(Error::RequestLimit);
|
return Err(Error::RequestLimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue