summaryrefslogtreecommitdiff
path: root/app/models/ci/runner.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-01-20 21:57:01 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-01-21 02:18:14 +0800
commit7a109402a866db1c84ef9af1c14e148ec944aa22 (patch)
tree11c3185d2b5d3326bdbfb49a53fe28de8156bb16 /app/models/ci/runner.rb
parent4b7e8f257074aa5af3816817d8d74d7ceb399b8a (diff)
downloadgitlab-ce-7a109402a866db1c84ef9af1c14e148ec944aa22.tar.gz
Prefer service object over after_save hook
Closes #26921
Diffstat (limited to 'app/models/ci/runner.rb')
-rw-r--r--app/models/ci/runner.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb
index 6e58a1878c8..b4760b5baaa 100644
--- a/app/models/ci/runner.rb
+++ b/app/models/ci/runner.rb
@@ -22,8 +22,6 @@ module Ci
scope :online, ->() { where('contacted_at > ?', LAST_CONTACT_TIME) }
scope :ordered, ->() { order(id: :desc) }
- after_save :tick_runner_queue, if: :form_editable_changed?
-
scope :owned_or_shared, ->(project_id) do
joins('LEFT JOIN ci_runner_projects ON ci_runner_projects.runner_id = ci_runners.id')
.where("ci_runner_projects.gl_project_id = :project_id OR ci_runners.is_shared = true", project_id: project_id)
@@ -149,12 +147,6 @@ module Ci
"runner:build_queue:#{self.token}"
end
- def form_editable_changed?
- FORM_EDITABLE.any? do |editable|
- public_send("#{editable}_changed?")
- end
- end
-
def tag_constraints
unless has_tags? || run_untagged?
errors.add(:tags_list,