Skip to content

Commit

Permalink
change cli arg names
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicBurkart committed May 30, 2023
1 parent c62b218 commit 15e2838
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ impl ApplicationConfig {
) -> Result<Self, ExitCode> {
let config_paths = opts.config_paths_with_formats();

let graceful_shutdown_duration = if opts.no_forced_shutdown {
let graceful_shutdown_duration = if opts.no_graceful_shutdown_limit {
None
} else {
Some(Duration::from_secs(u64::from(
opts.graceful_shutdown_duration,
opts.graceful_shutdown_limit_secs,
)))
};

Expand Down
14 changes: 7 additions & 7 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,21 @@ pub struct RootOpts {
#[arg(
long,
default_value = "60",
env = "VECTOR_GRACEFUL_SHUTDOWN_DURATION",
group = "graceful-shutdown-duration"
env = "VECTOR_GRACEFUL_SHUTDOWN_LIMIT_SECS",
group = "graceful-shutdown-limit"
)]
pub graceful_shutdown_duration: NonZeroU64,
pub graceful_shutdown_limit_secs: NonZeroU64,

/// Never time out while waiting for graceful shutdown after SIGINT or SIGTERM received. This is useful
/// when you would like for Vector to attempt to send data until terminated by a SIGKILL. Overrides/cannot
/// be set with --graceful-shutdown-duration.
/// be set with --graceful-shutdown-limit-secs.
#[arg(
long,
default_value = "false",
env = "VECTOR_NO_FORCED_SHUTDOWN",
group = "graceful-shutdown-duration"
env = "VECTOR_NO_GRACEFUL_SHUTDOWN_LIMIT",
group = "graceful-shutdown-limit"
)]
pub no_forced_shutdown: bool,
pub no_graceful_shutdown_limit: bool,

/// Set runtime allocation tracing
#[cfg(feature = "allocation-tracing")]
Expand Down

0 comments on commit 15e2838

Please sign in to comment.