#3827 - Move page stats clearance (cleanup tools) to a background task
| Identifier | #3827 |
|---|---|
| Issue type | Feature request or suggestion |
| Title | Move page stats clearance (cleanup tools) to a background task |
| Status | Closed (rejected) |
| Tags |
Roadmap: v11 (custom) Type: Performance (custom) |
| Handling member | Chris Graham |
| Addon | stats |
| Description | Currently the stats clearance (which creates a backup first) runs in real-time, but this may timeout, so should be done in a background task. |
| Steps to reproduce | |
| Funded? | No |
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".


Comments
This is rather wrong-aheaded.
In v11 we have moved towards GDPR-based compliance handling, automatic deletion or anoymisation of content after certain time. The idea of prematurely removing semi-old content then restoring it temporarily to view old stats, is incompatible. Besides, it's a weird bloaty feature nobody needs as you can always manually backup the stats table.
I think we should drop this feature entirely.
We should also investigate why there is a stats_clean Cron hook - given the GDPR cleanup code we already have. Isn't there a Cron hook to already handle GDPR cleanup? Not sure, I need to check.
Removed unneeded Cron hook.
Old stats clearance continues to run in site.php at the end of random page views, as we cannot rely on Cron running to delete excess amounts of logged data (Cron is not a strict requirement for Composr).