Commit d95c2101 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'fix-usage-trends-fixture' into 'master'

Fix usage trends fixtures

See merge request gitlab-org/gitlab!55271
parents 036bf218 7e03aa0e
...@@ -5,8 +5,6 @@ module Analytics ...@@ -5,8 +5,6 @@ module Analytics
class Measurement < ApplicationRecord class Measurement < ApplicationRecord
self.table_name = 'analytics_instance_statistics_measurements' self.table_name = 'analytics_instance_statistics_measurements'
EXPERIMENTAL_IDENTIFIERS = %i[pipelines_succeeded pipelines_failed pipelines_canceled pipelines_skipped].freeze
enum identifier: { enum identifier: {
projects: 1, projects: 1,
users: 2, users: 2,
......
...@@ -9,7 +9,8 @@ Gitlab::Seeder.quiet do ...@@ -9,7 +9,8 @@ Gitlab::Seeder.quiet do
model_class = Analytics::UsageTrends::Measurement model_class = Analytics::UsageTrends::Measurement
measurements = model_class.identifiers.flat_map do |_, id| # Skip generating data for billable_users, to avoid license check problems
measurements = model_class.identifiers.except(:billable_users).each_value.flat_map do |id|
recorded_at = 60.days.ago recorded_at = 60.days.ago
current_count = rand(1_000_000) current_count = rand(1_000_000)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment