mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-09-09 16:08:49 -06:00
rename federate process args
This commit is contained in:
parent
284ebb3304
commit
557576ad80
17
src/lib.rs
17
src/lib.rs
@ -79,13 +79,14 @@ struct CmdArgs {
|
|||||||
http_server: bool,
|
http_server: bool,
|
||||||
/// set to false to disable the outgoing federation in this process
|
/// set to false to disable the outgoing federation in this process
|
||||||
#[arg(long, default_value_t = true, action=ArgAction::Set)]
|
#[arg(long, default_value_t = true, action=ArgAction::Set)]
|
||||||
send_activities: bool,
|
federate_activities: bool,
|
||||||
/// the index of this outgoing federation process (1-based). only useful if you want to split federation work into multiple servers
|
/// the index of this outgoing federation process. only useful if you want to split federation work into multiple servers.
|
||||||
|
/// the first process has number 1.
|
||||||
#[arg(long, default_value_t = 1)]
|
#[arg(long, default_value_t = 1)]
|
||||||
activity_worker_index: i32,
|
federate_process_index: i32,
|
||||||
/// how many outgoing federation processes you are starting in total
|
/// how many outgoing federation processes you are starting in total. if set, make sure to set --activity-process-index differently for each.
|
||||||
#[arg(long, default_value_t = 1)]
|
#[arg(long, default_value_t = 1)]
|
||||||
activity_worker_count: i32,
|
federate_process_count: i32,
|
||||||
}
|
}
|
||||||
/// Max timeout for http requests
|
/// Max timeout for http requests
|
||||||
pub(crate) const REQWEST_TIMEOUT: Duration = Duration::from_secs(10);
|
pub(crate) const REQWEST_TIMEOUT: Duration = Duration::from_secs(10);
|
||||||
@ -256,11 +257,11 @@ pub async fn start_lemmy_server() -> Result<(), LemmyError> {
|
|||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
let federate = if args.send_activities {
|
let federate = if args.federate_activities {
|
||||||
Some(start_stop_federation_workers_cancellable(
|
Some(start_stop_federation_workers_cancellable(
|
||||||
Opts {
|
Opts {
|
||||||
process_index: args.activity_worker_index,
|
process_index: args.federate_process_index,
|
||||||
process_count: args.activity_worker_count,
|
process_count: args.federate_process_count,
|
||||||
},
|
},
|
||||||
pool.clone(),
|
pool.clone(),
|
||||||
federation_config.clone(),
|
federation_config.clone(),
|
||||||
|
Loading…
Reference in New Issue
Block a user