Skip to content

Conversation

@lukasjuhrich
Copy link
Collaborator

@lukasjuhrich lukasjuhrich commented Feb 21, 2022

Prepares #490

  • Discuss whether we want to do this yearly or regularly && adapt code accordingly
  • Test archival selection
    • test select_user_and_last_mem() select (used as CTE)
    • test cutoff filtering
    • test cutoff calculation from current date
    • test do-not-archive filtering
  • Implement archive_users (cleanup)
  • Add a web endpoint and button archiving all current users
  • Add a celerybeat task executing the archival

@lukasjuhrich
Copy link
Collaborator Author

This PR, as of now, does some base work that can directly be merged into develop.
All the rest can be coordinated in one or multiple different PRs (see the extended tasklist of #67).
Waiting for the tests to finish.

@lukasjuhrich lukasjuhrich marked this pull request as ready for review January 15, 2023 18:05
@lukasjuhrich lukasjuhrich changed the title Archival Archival preparations Jan 15, 2023
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,
Copy link
Contributor

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.

lukasjuhrich and others added 29 commits November 22, 2025 14:07
Otherwise it won't be known to our Metadata
We want to change the file in local development so we get the fix and
not only the complaint. This is what the default behavior does.
I now officially hate polymorphism in relational databases when based
on joined tables
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.

4 participants