From 3f4167dbd477c793e1a4cc572da0c12d66f2b649 Mon Sep 17 00:00:00 2001 From: Nishant Joshi Date: Wed, 13 Dec 2023 10:17:15 +0530 Subject: [PATCH] fix(api_locking): fix the unit interpretation for `LockSettings` expiry (#3121) --- crates/router/src/configs/settings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/router/src/configs/settings.rs b/crates/router/src/configs/settings.rs index f73fe099c295..b62831950856 100644 --- a/crates/router/src/configs/settings.rs +++ b/crates/router/src/configs/settings.rs @@ -897,11 +897,11 @@ impl<'de> Deserialize<'de> for LockSettings { redis_lock_expiry_seconds, delay_between_retries_in_milliseconds, } = Inner::deserialize(deserializer)?; - let redis_lock_expiry_seconds = redis_lock_expiry_seconds * 1000; + let redis_lock_expiry_milliseconds = redis_lock_expiry_seconds * 1000; Ok(Self { redis_lock_expiry_seconds, delay_between_retries_in_milliseconds, - lock_retries: redis_lock_expiry_seconds / delay_between_retries_in_milliseconds, + lock_retries: redis_lock_expiry_milliseconds / delay_between_retries_in_milliseconds, }) } }