Added trigger for namespace_aggregation_worker
What does this MR do and why?
Adds a trigger for namespace_aggregation_worker
when container_registry_size
is updated in project_statistics
Ref: https://gitlab.com/gitlab-org/gitlab/-/issues/358389
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
- Open rails console and get Project from a namespace
- Update the container_registry_size for the project_statistics of the project
- Trigger
project_statistics.refresh!
orps.refresh!(only: [:container_registry_size])
- Validate
Namespaces::ScheduleAggregationWorker
is triggered via sidekiq:gdk redis-cli monitor | grep -i ScheduleAggregationWorker
[1] pry(main)> n = Namespace.where(:path => 'suraj').first
[2] pry(main)> p = n.all_projects.first
[3] pry(main)> ps = p.statistics
[8] pry(main)> ps.refresh!
=> true
[8] pry(main)> ps.refresh!(only: [:container_registry_size])
=> true
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Suraj Tripathi