Class: Types::Ci::RunnerManagerType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::Ci::RunnerManagerType
show all
- Defined in:
- app/graphql/types/ci/runner_manager_type.rb
Instance Method Summary
collapse
Methods inherited from BaseObject
accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id
#present, #unpresented
Instance Method Details
#job_execution_status ⇒ Object
51
52
53
54
55
56
57
58
59
|
# File 'app/graphql/types/ci/runner_manager_type.rb', line 51
def job_execution_status
BatchLoader::GraphQL.for(runner_manager.id).batch(key: :running_builds_exist) do |runner_manager_ids, loader|
statuses = ::Ci::RunnerManager.id_in(runner_manager_ids).with_executing_builds.index_by(&:id)
runner_manager_ids.each do |runner_manager_id|
loader.call(runner_manager_id, statuses[runner_manager_id] ? :active : :idle)
end
end
end
|