summaryrefslogtreecommitdiffstats
path: root/src/cli.rs
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-04-23 12:51:57 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-04-26 14:46:22 +0200
commit1ebfa387fa5d47e3200b990f63f55bbe36adeff1 (patch)
tree52496b7406e2b90150358e0ad247e769e3f3b702 /src/cli.rs
parent155b9001a2db30588acf148f9c755f4b187e8e3a (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.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 4866ccd..4c629f8 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -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!())