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-05 19:47:04 +0100
commitc2dd98764d03dbdce9d0166ee53830e98972b459 (patch)
tree8863ef65a853a6fbd76e0ac28c03a98e442f054f /app/models/issue.rb
parent4ca4b0ff702a68a9aed5da70d9170da410eefafa (diff)
downloadgitlab-ce-throttle-touching-of-objects.tar.gz
Throttle the number of UPDATEs triggered by touchthrottle-touching-of-objects
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