summaryrefslogtreecommitdiff
path: root/lib/gitlab/cycle_analytics/staging_event_fetcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/cycle_analytics/staging_event_fetcher.rb')
-rw-r--r--lib/gitlab/cycle_analytics/staging_event_fetcher.rb30
1 files changed, 2 insertions, 28 deletions
diff --git a/lib/gitlab/cycle_analytics/staging_event_fetcher.rb b/lib/gitlab/cycle_analytics/staging_event_fetcher.rb
index 70ce82383b3..1454a1a33eb 100644
--- a/lib/gitlab/cycle_analytics/staging_event_fetcher.rb
+++ b/lib/gitlab/cycle_analytics/staging_event_fetcher.rb
@@ -3,34 +3,8 @@
module Gitlab
module CycleAnalytics
class StagingEventFetcher < BaseEventFetcher
- def initialize(*args)
- @projections = [build_table[:id]]
- @order = build_table[:created_at]
-
- super(*args)
- end
-
- def fetch
- Updater.update!(event_result, from: 'id', to: 'build', klass: ::Ci::Build)
-
- super
- end
-
- def events_query
- base_query.join(build_table).on(mr_metrics_table[:pipeline_id].eq(build_table[:commit_id]))
-
- super
- end
-
- private
-
- def allowed_ids
- nil
- end
-
- def serialize(event)
- AnalyticsBuildSerializer.new.represent(event['build'])
- end
+ include ProductionHelper
+ include BuildsEventHelper
end
end
end