mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
add prefix
This commit is contained in:
parent
cdb4791e66
commit
0de7b0e8f3
12
src/lib.rs
12
src/lib.rs
@ -70,23 +70,25 @@ use url::Url;
|
||||
about = "A link aggregator for the fediverse",
|
||||
long_about = "A link aggregator for the fediverse.\n\nThis is the Lemmy backend API server. This will connect to a PostgreSQL database, run any pending migrations and start accepting API requests."
|
||||
)]
|
||||
// TODO: Instead of defining individual env vars, only specify prefix once supported by clap.
|
||||
// https://github.com/clap-rs/clap/issues/3221
|
||||
pub struct CmdArgs {
|
||||
/// Don't run scheduled tasks.
|
||||
///
|
||||
/// If you are running multiple Lemmy server processes, you probably want to disable scheduled tasks on
|
||||
/// all but one of the processes, to avoid running the tasks more often than intended.
|
||||
#[arg(long, env, default_value_t = false)]
|
||||
#[arg(long, default_value_t = false, env = "LEMMY_DISABLE_SCHEDULED_TASKS")]
|
||||
disable_scheduled_tasks: bool,
|
||||
/// Disables the HTTP server.
|
||||
///
|
||||
/// This can be used to run a Lemmy server process that only performs scheduled tasks or activity sending.
|
||||
#[arg(long, env, default_value_t = false)]
|
||||
#[arg(long, default_value_t = false, env = "LEMMY_DISABLE_HTTP_SERVER")]
|
||||
disable_http_server: bool,
|
||||
/// Disable sending outgoing ActivityPub messages.
|
||||
///
|
||||
/// Only pass this for horizontally scaled setups.
|
||||
/// See https://join-lemmy.org/docs/administration/horizontal_scaling.html for details.
|
||||
#[arg(long, env, default_value_t = false)]
|
||||
#[arg(long, default_value_t = false, env = "LEMMY_DISABLE_ACTIVITY_SENDING")]
|
||||
disable_activity_sending: bool,
|
||||
/// The index of this outgoing federation process.
|
||||
///
|
||||
@ -96,12 +98,12 @@ pub struct CmdArgs {
|
||||
/// Make you have exactly one server with each `i` running, otherwise federation will randomly send duplicates or nothing.
|
||||
///
|
||||
/// See https://join-lemmy.org/docs/administration/horizontal_scaling.html for more detail.
|
||||
#[arg(long, env, default_value_t = 1)]
|
||||
#[arg(long, default_value_t = 1, env = "LEMMY_FEDERATE_PROCESS_INDEX")]
|
||||
federate_process_index: i32,
|
||||
/// How many outgoing federation processes you are starting in total.
|
||||
///
|
||||
/// If set, make sure to set --federate-process-index differently for each.
|
||||
#[arg(long, env, default_value_t = 1)]
|
||||
#[arg(long, default_value_t = 1, env = "LEMMY_FEDERATE_PROCESS_COUNT")]
|
||||
federate_process_count: i32,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user