-
-
Notifications
You must be signed in to change notification settings - Fork 658
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
feat: add job that cleans last seen every 24 hours #5114
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
await lastSeenService.store(); | ||
|
||
// We have no method to get these from the last seen service or any other service or store | ||
let stored = await db.rawDatabase.raw( |
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.
We have no get method for this table
src/lib/services/index.ts
Outdated
if (flagResolver.isEnabled('useLastSeenRefactor')) { | ||
schedulerService.schedule( | ||
lastSeenService.cleanLastSeen.bind(lastSeenService), | ||
hoursToMilliseconds(24), |
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.
Let's change to 1h so that we can run it outside of the app startup
This PR adds a cleanup job that removes unknown feature flags from last_seen_at_metrics table every 24 hours since we no longer have a foreign key on the name column in the features table.