Class: Ci::RunnerJobsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/ci/runner_jobs_finder.rb

Constant Summary collapse

ALLOWED_INDEXED_COLUMNS =
%w[id].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner, params = {}) ⇒ RunnerJobsFinder

Returns a new instance of RunnerJobsFinder.


9
10
11
12
# File 'app/finders/ci/runner_jobs_finder.rb', line 9

def initialize(runner, params = {})
  @runner = runner
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params


5
6
7
# File 'app/finders/ci/runner_jobs_finder.rb', line 5

def params
  @params
end

#runnerObject (readonly)

Returns the value of attribute runner


5
6
7
# File 'app/finders/ci/runner_jobs_finder.rb', line 5

def runner
  @runner
end

Instance Method Details

#executeObject


14
15
16
17
18
# File 'app/finders/ci/runner_jobs_finder.rb', line 14

def execute
  items = @runner.builds
  items = by_status(items)
  sort_items(items)
end