Class: Ci::ProcessPipelineService

Inherits:
Object
  • Object
show all
Defined in:
app/services/ci/process_pipeline_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pipeline) ⇒ ProcessPipelineService

Returns a new instance of ProcessPipelineService.


7
8
9
# File 'app/services/ci/process_pipeline_service.rb', line 7

def initialize(pipeline)
  @pipeline = pipeline
end

Instance Attribute Details

#pipelineObject (readonly)

Returns the value of attribute pipeline


5
6
7
# File 'app/services/ci/process_pipeline_service.rb', line 5

def pipeline
  @pipeline
end

Instance Method Details

#executeObject


11
12
13
14
15
16
17
18
19
# File 'app/services/ci/process_pipeline_service.rb', line 11

def execute
  increment_processing_counter

  update_retried

  Ci::PipelineProcessing::AtomicProcessingService
    .new(pipeline)
    .execute
end

#metricsObject


21
22
23
# File 'app/services/ci/process_pipeline_service.rb', line 21

def metrics
  @metrics ||= ::Gitlab::Ci::Pipeline::Metrics.new
end