Skip to content

BackgroundTasks 45133: Add cron Garbage Collection for background tasks - #12309

Merged
thojou merged 2 commits into
ILIAS-eLearning:trunkfrom
thojou:bg/12/45133
Oct 28, 2026
Merged

thojou merged 2 commits into
ILIAS-eLearning:trunkfrom
thojou:bg/12/45133

Conversation

@thojou

@thojou thojou commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Original: #12107

See: https://mantis.ilias.de/view.php?id=45133

Stale background-task data was cleaned only sporadically via a random trigger inside getBucketIdsOfUser. BasicPersistence now exposes garbageCollection() without that path, and new ilBackgroundTaskGC runs it on a configurable cron schedule declared in service.xml. English and German strings document the job. Minor tidy-up in getBucketIdsByState and a trailing-space fix on one unrelated language line.

This PR is the cherry-pick for ILIAS 12.

See: https://mantis.ilias.de/view.php?id=45133

Stale background-task data was cleaned only sporadically via a random trigger inside `getBucketIdsOfUser`. `BasicPersistence` now exposes `garbageCollection()` without that path, and new `ilBackgroundTaskGC` runs it on a configurable cron schedule declared in `service.xml`. English and German strings document the job. Minor tidy-up in `getBucketIdsByState` and a trailing-space fix on one unrelated language line.

(cherry picked from commit 8266da4)
See: https://mantis.ilias.de/view.php?id=45133

The garbage collection cron and `service.xml` (id `bgtk`) were
introduced under BackgroundTasks_. They belong in BackgroundTasks
while BackgroundTasks_ is retired.

This moves `ilBackgroundTaskGarbageCollection` and the service
definition into BackgroundTasks, adds `garbageCollection()` to the
`Persistence` interface, and logs via the `bgtk` component logger.

(cherry picked from commit ca1490a)
@thojou thojou added bugfix php Pull requests that update Php code labels Oct 28, 2026
@thojou
thojou merged commit 2c2057f into ILIAS-eLearning:trunk Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants