Add: #581 NGワード検出履歴を定期的に削除する処理 (#619)

* Add: #581 NGワード検出履歴を定期的に削除する処理

* マイグレーションコードを修正
This commit is contained in:
KMY(雪あすか) 2024-02-28 08:34:47 +09:00 committed by GitHub
parent aec832e257
commit b2acc7dbb8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 1 deletions

View file

@ -12,6 +12,7 @@ class Vacuum::NgHistoriesVacuum
private
def vacuum_histories!
NgwordHistory.where('created_at < ?', HISTORY_LIFE_DURATION.ago).in_batches.destroy_all
NgRuleHistory.where('created_at < ?', HISTORY_LIFE_DURATION.ago).in_batches.destroy_all
end
end