summaryrefslogtreecommitdiff
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-12-01 14:52:16 +0100
committerYorick Peterse <yorickpeterse@gmail.com>2017-12-06 15:59:37 +0100
commit856447ccd305832c4e9421ab9e81d63eea348203 (patch)
tree99df49e2050a3dcb2f2d289a8a728fa5b28f83be /app/models/issue.rb
parent483b5f1bfac5e338fab0e11f2045254f70df8fc1 (diff)
downloadgitlab-ce-856447ccd305832c4e9421ab9e81d63eea348203.tar.gz
Throttle the number of UPDATEs triggered by touch
This throttles the number of UPDATE queries that can be triggered by calling "touch" on a Note, Issue, or MergeRequest. For Note objects we also take care of updating the associated "noteable" relation in a smarter way than Rails does by default.
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index d6ef58d150b..33db197e612 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -9,6 +9,7 @@ class Issue < ActiveRecord::Base
include FasterCacheKeys
include RelativePositioning
include TimeTrackable
+ include ThrottledTouch
DueDateStruct = Struct.new(:title, :name).freeze
NoDueDate = DueDateStruct.new('No Due Date', '0').freeze