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:
parent
77cef20952
commit
bacf7966fe
@ -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
|
||||
|
||||
Reference in New Issue
Block a user