diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-06-06 15:29:40 +0200 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-08-20 17:12:15 +0200 |
commit | 00647b31b4741102451a2d785a43ef14bb818e24 (patch) | |
tree | 7d94580a6d4f83fd5684f66691cbd52b7d904c61 /app | |
parent | 64d4f3b2a45a01e23f6c45515f4f0271ea6fd4a0 (diff) | |
download | gitlab-ce-00647b31b4741102451a2d785a43ef14bb818e24.tar.gz |
add offline scope to Ci::Runner
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/runner.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index f41955f43e7..c0f632c2c9a 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -29,6 +29,7 @@ module Ci scope :active, -> { where(active: true) } scope :paused, -> { where(active: false) } scope :online, -> { where('contacted_at > ?', contact_time_deadline) } + scope :offline, -> { where.not(id: online) } scope :ordered, -> { order(id: :desc) } # BACKWARD COMPATIBILITY: There are needed to maintain compatibility with `AVAILABLE_SCOPES` used by `lib/api/runners.rb` |