summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Watson <jwatson@gitlab.com>2018-10-06 10:09:49 +0000
committerJeremy Watson <jwatson@gitlab.com>2018-10-06 10:09:49 +0000
commit533a6fef314a3ad0b007b2ce0885f148d29a4081 (patch)
treef93e66174007162e2d4a2964bdcbd7d984c5c113
parentb0ae67a4ecb2d11c1ce6ea286adfaa1b4e2a3449 (diff)
downloadgitlab-ce-533a6fef314a3ad0b007b2ce0885f148d29a4081.tar.gz
Updated code comments for clarity based on 2 years
-rw-r--r--app/workers/prune_old_events_worker.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/workers/prune_old_events_worker.rb b/app/workers/prune_old_events_worker.rb
index 958d613b859..dc4b7670131 100644
--- a/app/workers/prune_old_events_worker.rb
+++ b/app/workers/prune_old_events_worker.rb
@@ -6,9 +6,8 @@ class PruneOldEventsWorker
# rubocop: disable CodeReuse/ActiveRecord
def perform
- # Contribution calendar shows maximum 12 months of events.
- # Double nested query is used because MySQL doesn't allow DELETE subqueries
- # on the same table.
+ # Contribution calendar shows maximum 12 months of events, we retain 2 years for data integrity.
+ # Double nested query is used because MySQL doesn't allow DELETE subqueries on the same table.
Event.unscoped.where(
'(id IN (SELECT id FROM (?) ids_to_remove))',
Event.unscoped.where(