Class: Ci::UpdateRunnerService

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner) ⇒ UpdateRunnerService

Returns a new instance of UpdateRunnerService.


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

def initialize(runner)
  @runner = runner
end

Instance Attribute Details

#runnerObject (readonly)

Returns the value of attribute runner


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

def runner
  @runner
end

Instance Method Details

#update(params) ⇒ Object


11
12
13
14
15
# File 'app/services/ci/update_runner_service.rb', line 11

def update(params)
  runner.update(params).tap do |updated|
    runner.tick_runner_queue if updated
  end
end