From 557576ad806a4af19f0d7669516fe53e5730ce41 Mon Sep 17 00:00:00 2001 From: phiresky Date: Fri, 1 Sep 2023 12:21:43 +0000 Subject: [PATCH] rename federate process args --- src/lib.rs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 66c39415a..d168552bc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,13 +79,14 @@ struct CmdArgs { http_server: bool, /// set to false to disable the outgoing federation in this process #[arg(long, default_value_t = true, action=ArgAction::Set)] - send_activities: bool, - /// the index of this outgoing federation process (1-based). only useful if you want to split federation work into multiple servers + federate_activities: bool, + /// 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)] - activity_worker_index: i32, - /// how many outgoing federation processes you are starting in total + federate_process_index: i32, + /// 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)] - activity_worker_count: i32, + federate_process_count: i32, } /// Max timeout for http requests pub(crate) const REQWEST_TIMEOUT: Duration = Duration::from_secs(10); @@ -256,11 +257,11 @@ pub async fn start_lemmy_server() -> Result<(), LemmyError> { } else { None }; - let federate = if args.send_activities { + let federate = if args.federate_activities { Some(start_stop_federation_workers_cancellable( Opts { - process_index: args.activity_worker_index, - process_count: args.activity_worker_count, + process_index: args.federate_process_index, + process_count: args.federate_process_count, }, pool.clone(), federation_config.clone(),