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 cluster last modified #86

Merged
merged 2 commits into from
May 28, 2021
Merged

Add cluster last modified #86

merged 2 commits into from
May 28, 2021

Conversation

jsteverman
Copy link
Contributor

@jsteverman jsteverman commented May 14, 2021

This adds the field last_modified to Clusters and sets as Time.now.utc with a before_save callback. This may be the wrong name for it, as a save doesn't guarantee modification.

Without a way to filter clusters of interest, consuming services will need to process the entire database. That's acceptable when we are performing monthly updates, but not so when we are performing updates at much higher frequency.

edit: I should note that this doesn't deal with deletes, although in practice this shouldn't be too much of an issue.

@jsteverman jsteverman requested review from billdueber and aelkiss May 14, 2021 02:42
Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I'm happy with this. I suppose instead of testing output to stdout, full_report could accept an IO-type object to output to, and then you could pass it a StringIO and test against the contents of that... but, I think this is fine.

@aelkiss aelkiss merged commit 00071c2 into master May 28, 2021
@aelkiss aelkiss deleted the Add-Cluster-last-modified branch May 28, 2021 14:21
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.

2 participants