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 username table #347

Merged
merged 7 commits into from
Dec 20, 2022
Merged

Add username table #347

merged 7 commits into from
Dec 20, 2022

Conversation

kamicut
Copy link
Member

@kamicut kamicut commented Dec 16, 2022

This allows us to cache requests to OSM in a username table. I've added an updated_at table column so that we can run a subroutine to backfill missing usernames and also update them on a regular basis from OSM. For example, we could have a subroutine that picks the 10 least recent and request the usernames from OSM and update the database every x minutes.

@kamicut kamicut requested a review from vgeorge December 16, 2022 12:45
@vercel
Copy link

vercel bot commented Dec 16, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
osm-teams ✅ Ready (Inspect) Visit Preview Dec 20, 2022 at 2:11PM (UTC)

@kamicut kamicut marked this pull request as draft December 16, 2022 12:46
@kamicut kamicut marked this pull request as ready for review December 16, 2022 17:48
Copy link
Member

@vgeorge vgeorge left a comment

Choose a reason for hiding this comment

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

@kamicut I added some notes, let me know if you need support with the testing approach.

migrations/20221216122421_username_table.js Outdated Show resolved Hide resolved
migrations/20221216122421_username_table.js Outdated Show resolved Hide resolved
src/models/team.js Show resolved Hide resolved
src/models/team.js Outdated Show resolved Hide resolved
Copy link
Member

@vgeorge vgeorge left a comment

Choose a reason for hiding this comment

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

@kamicut thanks for the changes, this looks good 👍

@kamicut kamicut merged commit 079f082 into develop Dec 20, 2022
@kamicut kamicut deleted the feature/cached-usernames branch December 20, 2022 16:44
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