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
Add debug logic to Contact Rollups db result set stream iterator #31660
Conversation
@@ -301,6 +301,10 @@ def self.sync_contact_rollups_to_main(log_collector) | |||
|
|||
log("#{Time.now} Completed. #{num_total} source rows processed. #{num_inserts} insert(s), #{num_updates} update(s), #{num_unchanged} unchanged.") | |||
log_collector.info("#{num_total} source rows processed. #{num_inserts} insert(s), #{num_updates} update(s), #{num_unchanged} unchanged.") | |||
rescue StandardError => error |
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.
You can use the log_collector
here to capture the error right when it happens. By doing that we won't have to manually run the script later hopefully it will fail at the same step.
In addition, this will swallow the iteration error and the rest of the script will keep going without knowing there is a failure in the previous step. Should we re-raise here and stop processing?
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.
I've fixed the swallowing of the error. That was not my intention.
…". Will move it to its own PR. This reverts commit 1ce7ba9.
Should we merge this PR? |
No description provided.