-
- Downloads
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.
Showing
- app/models/concerns/throttled_touch.rb 10 additions, 0 deletionsapp/models/concerns/throttled_touch.rb
- app/models/issue.rb 1 addition, 0 deletionsapp/models/issue.rb
- app/models/merge_request.rb 1 addition, 0 deletionsapp/models/merge_request.rb
- app/models/note.rb 35 additions, 1 deletionapp/models/note.rb
- changelogs/unreleased/throttle-touching-of-objects.yml 5 additions, 0 deletionschangelogs/unreleased/throttle-touching-of-objects.yml
- spec/models/concerns/issuable_spec.rb 1 addition, 1 deletionspec/models/concerns/issuable_spec.rb
- spec/models/issue_spec.rb 4 additions, 0 deletionsspec/models/issue_spec.rb
- spec/models/merge_request_spec.rb 4 additions, 0 deletionsspec/models/merge_request_spec.rb
- spec/models/note_spec.rb 1 addition, 1 deletionspec/models/note_spec.rb
- spec/support/shared_examples/throttled_touch.rb 20 additions, 0 deletionsspec/support/shared_examples/throttled_touch.rb
app/models/concerns/throttled_touch.rb
0 → 100644
Please register or sign in to comment