FIX: Remove 4 month limit on IgnoredUser records (#11105)

b8c676e7 added the 'forever' option to the UI, and this is correctly stored in the database. However, we had a hard-coded limit of 4 months in the cleanup job. This commit removes the limit, so ignores can last forever.
This commit is contained in:
David Taylor 2020-11-03 12:12:43 +00:00 committed by GitHub
parent 9b593435b6
commit 1b7d39fa85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ module Jobs
every 1.day
def execute(args)
IgnoredUser.where("created_at <= ? OR expiring_at <= ?", 4.months.ago, Time.zone.now).delete_all
IgnoredUser.where("expiring_at <= ?", Time.zone.now).delete_all
IgnoredUser.where("created_at <= ? AND expiring_at IS NULL", 4.months.ago).delete_all
end
end
end