diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-01-20 21:57:01 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-01-21 02:18:14 +0800 |
commit | 7a109402a866db1c84ef9af1c14e148ec944aa22 (patch) | |
tree | 11c3185d2b5d3326bdbfb49a53fe28de8156bb16 /app/models | |
parent | 4b7e8f257074aa5af3816817d8d74d7ceb399b8a (diff) | |
download | gitlab-ce-7a109402a866db1c84ef9af1c14e148ec944aa22.tar.gz |
Prefer service object over after_save hook
Closes #26921
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/ci/runner.rb | 8 |
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, |