sergehuber opened a new pull request, #911: URL: https://github.com/apache/unomi/pull/911
## Plain-language summary Several background jobs in 4.0 only saw the internal "system" tenant. Purge, daily segment/scoring updates, rule statistics refresh and router startup after a restart skipped real tenants (including "default", where migrated data lives). Other jobs such as rule refresh already looped over every tenant. This PR applies the same pattern. ## What changed * Profile purge, segment date recalculation and rule statistics refresh: keep the outer `executeAsSystem` for permissions, then `executeAsTenant` for each tenant (including system). One tenant failure does not stop the others. Context is restored afterward. * Router Camel init: load import/export configurations under every tenant before building routes, so recurring configs survive a restart without a manual save. * Do **not** widen the system persistence filter. ## Tests * `BackgroundTenantTasksTest`: purge / segment / stats executors visit every tenant; context restored; system still only sees system; purge of one tenant leaves another alone. * `RouterCamelContextTenantLoadTest`: startup config load visits every tenant. ## Test plan * [x] `mvn -pl services,extensions/router/router-core -am test -Dtest=BackgroundTenantTasksTest,RouterCamelContextTenantLoadTest -Dsurefire.failIfNoSpecifiedTests=false` * [ ] CI green -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
