SUI-673: Scheduled task for quota usage retention pruning #118
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/jonas/SUI-673"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes SUI-673.
Registers a scheduled task that enforces the existing 90-day retention on
local_elediaai_core_usage.quota_manager::prune()was implemented but had no caller, so the documented retention never actually ran.Changes:
classes/task/prune_quota_usage.php— scheduled task callingquota_manager::prune()and reporting the deleted row count viamtrace()db/tasks.php— registers the task, daily at 4 AM (minute => 'R',hour => 4)2026080600 -> 2026080601(no upgrade step; scheduled tasks are picked up fromdb/tasks.php)test_prune_removes_old_records_only,test_task_prune_quota_usage_executes(12 -> 14 tests)03-dev-doc.md,01-features.md,05-quality.mdno longer describe the retention as an open gapRetention stays fixed at 90 days by decision — no admin setting.
quota_manager.php,classes/privacy/provider.php,db/install.xmlanddb/upgrade.phpare untouched.Privacy approval (irreversible class) granted by Lars on the issue for
3999c6e. Merge by Rolf once CI is green.- Move defined('MOODLE_INTERNAL') before use statements in task class - Add docblocks to setUp() and test methods in quota_manager_test.php These fixes address PHPCS ratchet violations that blocked the CI run. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>