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

LB-221: Only calculate stats of users who haven't been done recently #268

Merged
merged 2 commits into from Oct 31, 2017

Conversation

paramsingh
Copy link
Collaborator

This means that if someone's stats get calculated then the script
needs to start up again, it won't calculate their stats again.

This is part of the better error handling for stats calculation I'm working on.

This means that if someone's stats get calculated then the script
needs to start up again, it won't calculate their stats again.
Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

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

Looks like one minor cleanup, but otherwise ready to merge. Feel free to fix if needed, then merge.

LEFT JOIN statistics.user
ON public."user".id = statistics.user.user_id
WHERE public."user".last_login >= NOW() - INTERVAL ':x days'
AND (statistics.user.last_updated IS NULL OR statistics.user.last_updated < NOW() - INTERVAL ':y days')
""".format(columns=','.join(USER_GET_COLUMNS))), {
Copy link
Member

Choose a reason for hiding this comment

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

columns is not longer used, right?

@paramsingh
Copy link
Collaborator Author

Addressed the review and fixed the query a bit using shorter table names.

Copy link
Member

@mayhem mayhem left a comment

Choose a reason for hiding this comment

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

🌜 🌃 🌞

@mayhem mayhem merged commit acdabd7 into metabrainz:master Oct 31, 2017
@paramsingh paramsingh deleted the bq-error-handling branch October 31, 2017 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants