From aeeee3c1e3e9bfc38462cb315b6e19ee9fe6db70 Mon Sep 17 00:00:00 2001 From: Roman Melnikov Date: Wed, 1 Nov 2023 12:42:30 +0100 Subject: [Chore] Make activation wait timeout configurable Problem: Currently profile activation waiting timeout is hardcoded to 240 seconds, see https://github.com/serokell/deploy-rs/pull/48. In some cases, this timeout can be exceeded (e.g. activation performs a heavy DB migration and waits for it to finish before considering the profile activation succesful). Solution: Make this timeout configurable via 'activationTimeout' deploy attribute or corresponding '--activation-timeout' CLI option. For the sake of backward compatibility, the new 'wait' subcommand '--activation-timeout' option is made optional and defaults to 240 seconds if it wasn't provided. --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 0e5d817..856514f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -163,6 +163,7 @@ pub struct CmdOverrides { pub magic_rollback: Option, pub temp_path: Option, pub confirm_timeout: Option, + pub activation_timeout: Option, pub sudo: Option, pub dry_activate: bool, pub remote_build: bool, @@ -444,6 +445,9 @@ pub fn make_deploy_data<'a, 's>( if let Some(confirm_timeout) = cmd_overrides.confirm_timeout { merged_settings.confirm_timeout = Some(confirm_timeout); } + if let Some(activation_timeout) = cmd_overrides.activation_timeout { + merged_settings.confirm_timeout = Some(activation_timeout); + } DeployData { node_name, -- cgit v1.2.3