update_runner_service.rb 293 Bytes
Newer Older
1 2
# frozen_string_literal: true

3 4 5 6 7 8 9 10 11
module Ci
  class UpdateRunnerService
    attr_reader :runner

    def initialize(runner)
      @runner = runner
    end

    def update(params)
12 13
      runner.update(params).tap do |updated|
        runner.tick_runner_queue if updated
14 15 16 17
      end
    end
  end
end