-
Notifications
You must be signed in to change notification settings - Fork 39
adding partitioned table for reporting_facility_monthly_follow_ups_a… #5746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
adding partitioned table for reporting_facility_monthly_follow_ups_a… #5746
Conversation
|
This PR is stale. Please review/update it or close it. |
igbanam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
| end | ||
| reporting_table = args[:table_name] | ||
| Reports::Month.order(:month_date).select(:month_date).each_with_index do |reporting_month, index| | ||
| RefreshReportingPartitionedTableJob.set(wait_until: Time.now + (index * 45).minutes).perform_async(reporting_month.month_date.to_s, reporting_table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we know 45 minutes works for a table? or How do we know if it's too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, 45 mins is a little too much for a partition refresh currently.
This just schedules every partition refresh at a marginal interval to prevent every refresh happening at once and not block any other jobs that would be come as part of regular functionality.
Original thought behind this is to use this job just once for each table initially when they are moved from materialized view to a partitioned table
igbanam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
|
This PR is stale. Please review/update it or close it. |
…nd_registrations
Story card: sc-17573
Because
We need to move a our mat views to partitioned table
This addresses
Creating a partitioned table reporting_facility_monthly_follow_ups_and_registrations under simple_reporting schema
Both mat view and partitioned table version will exist for a small time for monitoring in prod
Test instructions
Suite test