summaryrefslogtreecommitdiff
path: root/app/graphql/types/ci/runner_status_enum.rb
blob: e8bd3d15a544658e4f1691b738d64ea65f5ba9b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# frozen_string_literal: true

module Types
  module Ci
    class RunnerStatusEnum < BaseEnum
      graphql_name 'CiRunnerStatus'

      value 'ACTIVE',
            description: 'Runner that is not paused.',
            deprecated: {
              reason: :renamed,
              replacement: 'CiRunner.paused',
              milestone: '14.6'
            },
            value: :active

      value 'PAUSED',
            description: 'Runner that is paused.',
            deprecated: {
              reason: :renamed,
              replacement: 'CiRunner.paused',
              milestone: '14.6'
            },
            value: :paused

      value 'ONLINE',
            description: "Runner that contacted this instance within the last #{::Ci::Runner::ONLINE_CONTACT_TIMEOUT.inspect}.",
            value: :online

      value 'OFFLINE',
            description: "Runner that has not contacted this instance within the " \
              "last #{::Ci::Runner::ONLINE_CONTACT_TIMEOUT.inspect}. Will be considered `STALE` if offline for " \
              "more than #{::Ci::Runner::STALE_TIMEOUT.inspect}.",
            value: :offline

      value 'STALE',
            description: "Runner that has not contacted this instance within the last #{::Ci::Runner::STALE_TIMEOUT.inspect}.",
            value: :stale

      value 'NEVER_CONTACTED',
            description: 'Runner that has never contacted this instance.',
            value: :never_contacted
    end
  end
end