diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-04-23 12:51:57 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-04-26 14:46:22 +0200 |
commit | 1ebfa387fa5d47e3200b990f63f55bbe36adeff1 (patch) | |
tree | 52496b7406e2b90150358e0ad247e769e3f3b702 /src/cli.rs | |
parent | 155b9001a2db30588acf148f9c755f4b187e8e3a (diff) |
Add support for database connection timeout
This patch adds support for a database connection timeout, giving the user the
option to configure one, but hardcoding a default timeout to 30 seconds.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -69,6 +69,13 @@ pub fn cli<'a>() -> App<'a> { .value_name("NAME") .about("Overwrite the database name set via configuration. Can also be overriden via environment, but this setting has presendence.") ) + .arg(Arg::new("database_connection_timeout") + .required(false) + .multiple(false) + .long("db-timeout") + .value_name("TIMEOUT") + .about("Overwrite the database connection timeout set via configuration. Can also be overriden via environment, but this setting has presendence.") + ) .subcommand(App::new("generate-completions") .version(crate_version!()) |