Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/namespaces/schedule_aggregation_worker.rb')
-rw-r--r--app/workers/namespaces/schedule_aggregation_worker.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/workers/namespaces/schedule_aggregation_worker.rb b/app/workers/namespaces/schedule_aggregation_worker.rb
index 60210e2f5a7..94343a9e378 100644
--- a/app/workers/namespaces/schedule_aggregation_worker.rb
+++ b/app/workers/namespaces/schedule_aggregation_worker.rb
@@ -16,8 +16,8 @@ module Namespaces
return if root_ancestor.aggregation_scheduled?
Namespace::AggregationSchedule.safe_find_or_create_by!(namespace_id: root_ancestor.id)
- rescue ActiveRecord::RecordNotFound
- log_error(namespace_id)
+ rescue ActiveRecord::RecordNotFound => ex
+ Gitlab::ErrorTracking.track_exception(ex, namespace_id: namespace_id)
end
private
@@ -34,9 +34,5 @@ module Namespaces
Namespace::AggregationSchedule.table_exists?
end
-
- def log_error(root_ancestor_id)
- Gitlab::SidekiqLogger.error("Namespace can't be scheduled for aggregation: #{root_ancestor_id} does not exist")
- end
end
end