Sha256: 5f5b73f8e0e2ce01fc4c949a385cdda53f0ef6a443930b544d9c45d350821ac4
Contents?: true
Size: 777 Bytes
Versions: 20
Compression:
Stored size: 777 Bytes
Contents
# frozen_string_literal: true module Cron # # Clean up Audit Logs that have not been updated in 90 days # class TrimAuditLogs < TrimCollection # # Fetch each Audit Log and delete it if hasn't been updated in 90 days # def collection AuditLog.all end # # Check which audit logs we wanted deleted # # Should be older than 90 days and either not a user model audit log or the model associated with # the UserModelAuditLog has been deleted # def archive?(item) super && (!item.is_a?(UserModelAuditLog) || item.model.blank?) rescue StandardError super end # # Allowed time the amount of time allowed to exists before deleting # def allowed_time 90.days.ago end end end
Version data entries
20 entries across 20 versions & 1 rubygems