From 3b5f09a4191ae5d83bfaf0a527cae17ba7484365 Mon Sep 17 00:00:00 2001 From: Akshatha <71076330+qptr@users.noreply.github.com> Date: Thu, 4 Jan 2024 18:43:55 +0530 Subject: [PATCH] Use keywords in AlphaSms balance check logs for easy filtering (#5374) **Story card:** [sc-11640](https://app.shortcut.com/simpledotorg/story/11640/automate-alphasms-balance-check) Use "AlphaSms account balance" in account balance check logs to be able to filter these more intentionally. --- lib/tasks/alpha_sms.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/alpha_sms.rake b/lib/tasks/alpha_sms.rake index 239c6602a2..748f903de2 100644 --- a/lib/tasks/alpha_sms.rake +++ b/lib/tasks/alpha_sms.rake @@ -11,9 +11,9 @@ namespace :alpha_sms do balance_amount = response.dig(:data, :balance)&.to_f if expiry_date < alert_in_days.days.from_now - Rails.logger.error("Account balance expires in less than #{alert_in_days}. Please recharge before #{expiry_date}.") + Rails.logger.error("AlphaSms account balance expires in less than #{alert_in_days}. Please recharge before #{expiry_date}.") elsif balance_amount < (alert_in_days * max_cost_per_day) - Rails.logger.error("Remaining account balance is #{balance_amount} BDT. May expire in less than #{alert_in_days} days.") + Rails.logger.error("Alphasms account balance remaining is #{balance_amount} BDT. May expire in less than #{alert_in_days} days.") end print("Balance: #{balance_amount} BDT\nExpiry: #{expiry_date}") end