diff options
author | Jeremy Watson <jwatson@gitlab.com> | 2018-10-06 13:09:49 +0300 |
---|---|---|
committer | Jeremy Watson <jwatson@gitlab.com> | 2018-10-06 13:09:49 +0300 |
commit | 533a6fef314a3ad0b007b2ce0885f148d29a4081 (patch) | |
tree | f93e66174007162e2d4a2964bdcbd7d984c5c113 /app | |
parent | b0ae67a4ecb2d11c1ce6ea286adfaa1b4e2a3449 (diff) |
Updated code comments for clarity based on 2 years
Diffstat (limited to 'app')
-rw-r--r-- | app/workers/prune_old_events_worker.rb | 5 |
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( |