Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

Implemented the cleanupExpiredTokens method in apps/backend/src/jobs/processors/cleanup.processor.ts to delete expired tokens from the authSessions table using Drizzle ORM.
Also exported authSessions from packages/database/src/index.ts to make it accessible.
Verified that the method uses the correct database service and query logic.
Reverted temporary changes to package.json and pnpm-lock.yaml that were made during the testing process.


PR created automatically by Jules for task 1953273572461393205 started by @whodaniel

Replaced the simulation code in `cleanupExpiredTokens` with actual database deletion logic using Drizzle ORM.
Updated `@the-new-fuse/database` to export the `authSessions` schema.
Injected `DatabaseService` into `CleanupProcessor`.
Added `lt` (less than) operator import from `drizzle-orm` to filter expired tokens.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

PR Description Missing Sections ⚠️

Your PR description is missing the following sections:

  • Summary

  • Changes

  • Testing

    Please update your PR description to include these sections.

Copy link
Owner

@whodaniel whodaniel left a comment

Choose a reason for hiding this comment

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

Token Cleanup Implementation Review

This PR successfully implements actual database cleanup for expired tokens:

✅ Uses Drizzle ORM with proper query builder
✅ Deletes expired tokens from authSessions table
✅ Proper dependency injection of DatabaseService
✅ Exports authSessions schema from database package
✅ Replaces TODO with working implementation

Code Quality:

  • Correct use of lt() operator for date comparison
  • Proper error handling maintained
  • Returns actual count instead of mock data

Recommendation: Approve and merge.

@whodaniel whodaniel marked this pull request as ready for review January 11, 2026 05:13
@whodaniel whodaniel merged commit 5c90d0e into main Jan 11, 2026
36 of 51 checks passed
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