summaryrefslogtreecommitdiff
path: root/app/workers/namespaces/update_root_statistics_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/namespaces/update_root_statistics_worker.rb')
-rw-r--r--app/workers/namespaces/update_root_statistics_worker.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/workers/namespaces/update_root_statistics_worker.rb b/app/workers/namespaces/update_root_statistics_worker.rb
new file mode 100644
index 00000000000..9fdf8e2506b
--- /dev/null
+++ b/app/workers/namespaces/update_root_statistics_worker.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module Namespaces
+ class UpdateRootStatisticsWorker
+ include Gitlab::EventStore::Subscriber
+
+ data_consistency :always
+
+ idempotent!
+
+ feature_category :source_code_management
+
+ def handle_event(event)
+ ScheduleAggregationWorker.perform_async(event.data[:namespace_id])
+ end
+ end
+end