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 'lib/bulk_imports/pipeline/runner.rb')
-rw-r--r--lib/bulk_imports/pipeline/runner.rb26
1 files changed, 2 insertions, 24 deletions
diff --git a/lib/bulk_imports/pipeline/runner.rb b/lib/bulk_imports/pipeline/runner.rb
index 04038e50399..898540d42ed 100644
--- a/lib/bulk_imports/pipeline/runner.rb
+++ b/lib/bulk_imports/pipeline/runner.rb
@@ -5,30 +5,6 @@ module BulkImports
module Runner
extend ActiveSupport::Concern
- included do
- private
-
- def extractors
- @extractors ||= self.class.extractors.map(&method(:instantiate))
- end
-
- def transformers
- @transformers ||= self.class.transformers.map(&method(:instantiate))
- end
-
- def loaders
- @loaders ||= self.class.loaders.map(&method(:instantiate))
- end
-
- def pipeline_name
- @pipeline ||= self.class.name
- end
-
- def instantiate(class_config)
- class_config[:klass].new(class_config[:options])
- end
- end
-
def run(context)
info(context, message: "Pipeline started", pipeline: pipeline_name)
@@ -47,6 +23,8 @@ module BulkImports
end
end
end
+
+ after_run.call(context) if after_run.present?
end
private # rubocop:disable Lint/UselessAccessModifier