mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
Merge pull request #3529 from cpradio/remove-ip-on-created-at
FEATURE: Use created_at to remove an ip if its last_match_at is null
This commit is contained in:
commit
bfa3da640d
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ module Jobs
|
|||
|
||||
# remove old unmatched IP addresses
|
||||
ScreenedIpAddress.where(action_type: ScreenedIpAddress.actions[:block])
|
||||
.where("last_match_at < ?", last_match_threshold)
|
||||
.where("last_match_at < ? OR (last_match_at IS NULL AND created_at < ?)", last_match_threshold, last_match_threshold)
|
||||
.destroy_all
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue