mirror of
https://github.com/discourse/discourse.git
synced 2025-01-23 23:21:03 +08:00
bacf7966fe
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.
13 lines
315 B
Ruby
13 lines
315 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Jobs
|
|
class PurgeExpiredIgnoredUsers < ::Jobs::Scheduled
|
|
every 1.day
|
|
|
|
def execute(args)
|
|
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
|