Class: Ci::TestFailureHistoryService::Async

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service) ⇒ Async

Returns a new instance of Async.


8
9
10
# File 'app/services/ci/test_failure_history_service.rb', line 8

def initialize(service)
  @service = service
end

Instance Attribute Details

#serviceObject (readonly)

Returns the value of attribute service.


6
7
8
# File 'app/services/ci/test_failure_history_service.rb', line 6

def service
  @service
end

Instance Method Details

#perform_if_neededObject


12
13
14
# File 'app/services/ci/test_failure_history_service.rb', line 12

def perform_if_needed
  TestFailureHistoryWorker.perform_async(service.pipeline.id) if service.should_track_failures?
end