Skip to content

Background task: delete expired tokens#10440

Draft
david-crespo wants to merge 1 commit into
mainfrom
token-cleanup-task
Draft

Background task: delete expired tokens#10440
david-crespo wants to merge 1 commit into
mainfrom
token-cleanup-task

Conversation

@david-crespo
Copy link
Copy Markdown
Contributor

Claude one-shot based on #10009, which did the same for expired sessions. Closes #8282.

WHERE time_expires IS NOT NULL AND time_expires < $1 \
ORDER BY time_expires \
LIMIT $2",
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as https://github.com/oxidecomputer/omicron/pull/10009/changes#r2908069585: the query DSL can't do order by and limit on a delete.

/// This must be updated when you change the database schema. Refer to
/// schema/crdb/README.adoc in the root of this repository for details.
pub const SCHEMA_VERSION: Version = Version::new(257, 0, 0);
pub const SCHEMA_VERSION: Version = Version::new(258, 0, 0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Dang lol. Y'all have been busy.

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.

Want background task for cleaning up expired tokens and sessions

2 participants