Updated code comments for clarity based on 2 years
This commit is contained in:
parent
b0ae67a4ec
commit
533a6fef31
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue