Sha256: 58168fe84dfdba1315b2118e31f607390acde30f08b00907987b484fd7119425
Contents?: true
Size: 698 Bytes
Versions: 9
Compression:
Stored size: 698 Bytes
Contents
# frozen_string_literal: true module Cron # # Clean up Jobs # class TrimCommandJobs < TrimCollection # # Fetch each Audit Log and delete it if hasn't been updated in 90 days # def collection CommandJob.all end # # Check which audit logs we wanted to be 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 allowed_time_for_item(job) job.ttl.days.ago.utc rescue StandardError => error App47Logger.log_warn "Unable to determine if job should be archived: #{job.inspect}", error 30.days.ago.utc end end end
Version data entries
9 entries across 9 versions & 1 rubygems