-
Notifications
You must be signed in to change notification settings - Fork 9
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
Archival #538
base: develop
Are you sure you want to change the base?
Archival #538
Conversation
b5b4131
to
cf0d6b1
Compare
364a437
to
bbe334a
Compare
bbe334a
to
f655097
Compare
ec42b3e
to
f655097
Compare
This PR, as of now, does some base work that can directly be merged into |
f655097
to
6c1333a
Compare
def get_invalidated_archive_memberships() -> list[Membership]: | ||
"""Get all memberships in `to_be_archived` of users who have an active `do-not-archive` property. | ||
Selected are those users | ||
- whose last membership in the member_group ended two weeks in the past, |
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.
Looks do me like we are now testing for >= 2 years and not weeks.
Introduces `select_users_and_last_mem` returning the `select`
This suits the relational algebra pipeline better, as the entities we select from actually correspond to a projection done after all the joins and filtering. This change does not alter the compilation result of this select statement.
1. We restrict the ranges to a smaller subset which is still meaningful. 2. We use the `select` statement itself rather than the wrapper method adding a ton of `joinedload`s.
b04bd74
to
f715e29
Compare
Prepares #490
select_user_and_last_mem()
select (used as CTE)do-not-archive
filteringarchive_users
(cleanup)