From 0c959aa9b98f461f6d924ecd9ee1c0e2c17a45b7 Mon Sep 17 00:00:00 2001 From: Roy Peter <16620459+roypeter@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:23:59 +0530 Subject: [PATCH] Update india matview and cache refresh time (#5294) **Story card:** [sc-11220](https://app.shortcut.com/simpledotorg/story/11220) ## Because Due to the infra scale-down, the mat view refresh is taking 26 hours. Therefore, we've moved the refresh start time to Saturday evening at 5 PM and adjusted the cache warming to 11:44 PM ## This addresses Reporting data issues in the dashboard and progress tab --- config/schedule.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config/schedule.rb b/config/schedule.rb index 4be9edd3a9..5da085a790 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -36,8 +36,9 @@ def local(time) "07:00 pm" ].map { |t| local(t) } -REPORTS_REFRESH_FREQUENCY = CountryConfig.current_country?("India") ? :sunday : :day -REPORTS_CACHE_REFRESH_TIME = CountryConfig.current_country?("India") ? "12:00 pm" : "04:30 am" +REPORTS_REFRESH_FREQUENCY = CountryConfig.current_country?("India") ? :saturday : :day +REPORTS_REFRESH_TIME = CountryConfig.current_country?("India") ? "05:00 pm" : "12:30 am" +REPORTS_CACHE_REFRESH_TIME = CountryConfig.current_country?("India") ? "11:55 pm" : "04:30 am" every :day, at: FOLLOW_UP_TIMES, roles: [:cron] do rake "db:refresh_daily_follow_ups_and_registrations" @@ -73,7 +74,7 @@ def local(time) rake "exotel_tasks:whitelist_patient_phone_numbers" end -every REPORTS_REFRESH_FREQUENCY, at: local("12:30 am"), roles: [:cron] do +every REPORTS_REFRESH_FREQUENCY, at: local(REPORTS_REFRESH_TIME), roles: [:cron] do rake "db:refresh_reporting_views" end