diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-01 23:14:21 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-02 17:29:29 +0300 |
commit | c6acb77d8a19063f26f8dfcda85beead50fe6e96 (patch) | |
tree | 4c3c1256b67d3c77e5c5f8997026d026001c6dc4 /app/workers | |
parent | 0fec9a4fc7fae7480a92d6402d3ad144b4bd7233 (diff) |
Removes update_statistics_namespace feature flag
After measuring the impact of the namespace storage on
https://gitlab.com/gitlab-org/gitlab-ce/issues/64092. It was decided
that it's performant enough. So we can freely remove the feature flag
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64092
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/namespaces/root_statistics_worker.rb | 6 | ||||
-rw-r--r-- | app/workers/namespaces/schedule_aggregation_worker.rb | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/app/workers/namespaces/root_statistics_worker.rb b/app/workers/namespaces/root_statistics_worker.rb index 48876825564..0c1ca5eb975 100644 --- a/app/workers/namespaces/root_statistics_worker.rb +++ b/app/workers/namespaces/root_statistics_worker.rb @@ -9,7 +9,7 @@ module Namespaces def perform(namespace_id) namespace = Namespace.find(namespace_id) - return unless update_statistics_enabled_for?(namespace) && namespace.aggregation_scheduled? + return unless namespace.aggregation_scheduled? Namespaces::StatisticsRefresherService.new.execute(namespace) @@ -23,9 +23,5 @@ module Namespaces def log_error(namespace_path, error_message) Gitlab::SidekiqLogger.error("Namespace statistics can't be updated for #{namespace_path}: #{error_message}") end - - def update_statistics_enabled_for?(namespace) - Feature.enabled?(:update_statistics_namespace, namespace) - end end end diff --git a/app/workers/namespaces/schedule_aggregation_worker.rb b/app/workers/namespaces/schedule_aggregation_worker.rb index a4594b84b13..983ce4bef4a 100644 --- a/app/workers/namespaces/schedule_aggregation_worker.rb +++ b/app/workers/namespaces/schedule_aggregation_worker.rb @@ -12,7 +12,7 @@ module Namespaces namespace = Namespace.find(namespace_id) root_ancestor = namespace.root_ancestor - return unless update_statistics_enabled_for?(root_ancestor) && !root_ancestor.aggregation_scheduled? + return if root_ancestor.aggregation_scheduled? Namespace::AggregationSchedule.safe_find_or_create_by!(namespace_id: root_ancestor.id) rescue ActiveRecord::RecordNotFound @@ -37,9 +37,5 @@ module Namespaces def log_error(root_ancestor_id) Gitlab::SidekiqLogger.error("Namespace can't be scheduled for aggregation: #{root_ancestor_id} does not exist") end - - def update_statistics_enabled_for?(root_ancestor) - Feature.enabled?(:update_statistics_namespace, root_ancestor) - end end end |