Allow multiple purge cron jobs

Created on 4 March 2021, over 3 years ago
Updated 11 May 2023, over 1 year ago

Problem/Motivation

It is currently possible to only use a single configuration for the cron process, which is the same as the "one off" purge you can run from the user interface. In some cases, it might be desirable to handle different types of users differently. For example, you might want to completely delete users that have never logged in, while you want to use some other type of cancellation method on users that have been active in the past, but have now not logged in for an extended period of time. This is currently not possible; you can filter on these types of users, but you then need to pick a single cancellation method.

An additional caveat that would be solved by changing this is that when using the manual interface, it is important to remember to change back the settings, since they are also shared with the cron job.

Proposed resolution

Introduce a configuration entity that is a "purge rule", that allows multiple purge schemes to be set up. The interface for setting up such a rule would be practically identical to the current form.

Remaining tasks

  • Reach concencus this is a good idea
  • Decide whether this is a change that warrants a major version bumb
  • Implement

User interface changes

This change would probably mean the modules interface would consist of two parts:

  1. Screen to run a purge immediately
  2. Overview of purge rules
  3. (Edit screen for purge rules, once an existing one is edited or a new one is created).

A nice to have would be to have a button on the "Run immediately" screen to save as a rule, and possibly also to load the settings from a rule. This could be a follow-up issue, though.

API changes

Not sure if this constitutes API changes, but a new config entity will be introduced.

Data model changes

Instead of a single set of configuration, the module will have a config entity type that can be used to define multiple purge rules.

Feature request
Status

Active

Version

4.0

Component

Code

Created by

🇳🇱Netherlands eelkeblok Netherlands 🇳🇱

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024