Class: ExceptionHunter::ErrorReaper
- Inherits:
-
Object
- Object
- ExceptionHunter::ErrorReaper
- Defined in:
- lib/exception_hunter/error_reaper.rb
Class Method Summary collapse
Class Method Details
.purge(stale_time: Config.errors_stale_time) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/exception_hunter/error_reaper.rb', line 4 def purge(stale_time: Config.errors_stale_time) ActiveRecord::Base.transaction do Error.with_occurrences_before(Date.today - stale_time).destroy_all ErrorGroup.without_errors.destroy_all end end |