Skip to content
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

Merged
merged 11 commits into from Nov 14, 2019

Conversation

sureshc
Copy link
Contributor

@sureshc sureshc commented Nov 4, 2019

No description provided.

@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

@sureshc sureshc Nov 4, 2019

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.

@hacodeorg
Copy link
Contributor

Should we merge this PR?

@sureshc sureshc merged commit 637cb8a into staging Nov 14, 2019
@sureshc sureshc deleted the debug-contact-rollups-stream-iterator branch November 14, 2019 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants