diff options
Diffstat (limited to 'db')
7 files changed, 6 insertions, 27 deletions
diff --git a/db/fixtures/development/99_common_metrics.rb b/db/fixtures/development/99_common_metrics.rb index 1f39c0ce5a0..0406ce0c8c9 100644 --- a/db/fixtures/development/99_common_metrics.rb +++ b/db/fixtures/development/99_common_metrics.rb @@ -1,5 +1,3 @@ # frozen_string_literal: true -require Rails.root.join('db/importers/common_metrics_importer.rb') - -::Importers::CommonMetricsImporter.new.execute +::Gitlab::Importers::CommonMetrics::Importer.new.execute diff --git a/db/fixtures/production/999_common_metrics.rb b/db/fixtures/production/999_common_metrics.rb index 1f39c0ce5a0..0406ce0c8c9 100644 --- a/db/fixtures/production/999_common_metrics.rb +++ b/db/fixtures/production/999_common_metrics.rb @@ -1,5 +1,3 @@ # frozen_string_literal: true -require Rails.root.join('db/importers/common_metrics_importer.rb') - -::Importers::CommonMetricsImporter.new.execute +::Gitlab::Importers::CommonMetrics::Importer.new.execute diff --git a/db/importers/common_metrics_importer.rb b/db/importers/common_metrics_importer.rb deleted file mode 100644 index a2e3996a123..00000000000 --- a/db/importers/common_metrics_importer.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This functionality has been moved to the lib/gitlab/importers/common_metrics module. -# This is here only to preserve existing ::Importers::CommonMetricsImporter api -module Importers - module CommonMetricsImporter - def self.new(*args) - Gitlab::Importers::CommonMetrics::Importer.new(*args) - end - end -end diff --git a/db/migrate/20180831164910_import_common_metrics.rb b/db/migrate/20180831164910_import_common_metrics.rb index f67d5f40aad..cc50ac71f49 100644 --- a/db/migrate/20180831164910_import_common_metrics.rb +++ b/db/migrate/20180831164910_import_common_metrics.rb @@ -3,12 +3,10 @@ class ImportCommonMetrics < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down diff --git a/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb b/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb index 5cd312837df..50d3e406496 100644 --- a/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb +++ b/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb @@ -1,12 +1,10 @@ class ImportCommonMetricsNginxVts < ActiveRecord::Migration[5.0] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down diff --git a/db/migrate/20190326164045_import_common_metrics_knative.rb b/db/migrate/20190326164045_import_common_metrics_knative.rb index 340ec1e1f75..46f074ef780 100644 --- a/db/migrate/20190326164045_import_common_metrics_knative.rb +++ b/db/migrate/20190326164045_import_common_metrics_knative.rb @@ -3,12 +3,10 @@ class ImportCommonMetricsKnative < ActiveRecord::Migration[5.0] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down diff --git a/db/migrate/20190408163745_prometheus_knative05_fix.rb b/db/migrate/20190408163745_prometheus_knative05_fix.rb index c11f6f0e29b..1b8e07a8c08 100644 --- a/db/migrate/20190408163745_prometheus_knative05_fix.rb +++ b/db/migrate/20190408163745_prometheus_knative05_fix.rb @@ -6,12 +6,10 @@ class PrometheusKnative05Fix < ActiveRecord::Migration[5.0] include Gitlab::Database::MigrationHelpers - require Rails.root.join('db/importers/common_metrics_importer.rb') - DOWNTIME = false def up - Importers::CommonMetricsImporter.new.execute + ::Gitlab::Importers::CommonMetrics::Importer.new.execute end def down |