Skip to content

Commit

Permalink
update conditions for sessions ready to be sanitised
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Jan 31, 2024
1 parent c15db66 commit 78868a8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ export const getExpiredSessionIds = async (): Promise<string[]> => {
query GetExpiredSessionIds($retentionPeriod: timestamptz) {
lowcal_sessions(
where: {
submitted_at: { _lt: $retentionPeriod }
sanitised_at: { _is_null: true }
_or: [
{ deleted_at: { _lt: $retentionPeriod } }
{ submitted_at: { _lt: $retentionPeriod } }
{ locked_at: { _lt: $retentionPeriod } }
]
}
) {
id
Expand Down Expand Up @@ -123,6 +127,7 @@ export const sanitiseLowcalSessions: Operation = async () => {
_or: [
{ deleted_at: { _lt: $retentionPeriod } }
{ submitted_at: { _lt: $retentionPeriod } }
{ locked_at: { _lt: $retentionPeriod } }
]
}
) {
Expand Down

0 comments on commit 78868a8

Please sign in to comment.