Sha256: 343fecc9e163bb7fff12c9e6a4276070e15b6f69bd98e2a12e8ebcec7371b6aa
Contents?: true
Size: 926 Bytes
Versions: 22
Compression:
Stored size: 926 Bytes
Contents
class ChecksumAuditLog < ActiveRecord::Base def ChecksumAuditLog.get_audit_log(version) ChecksumAuditLog.find_or_create_by_pid_and_dsid_and_version(pid: version.pid, dsid: version.dsid, version: version.versionID) end def ChecksumAuditLog.prune_history(version) ## Check to see if there are previous passing logs that we can delete # we want to keep the first passing event after a failure, the most current passing event, and all failures so that this table doesn't grow too large # Simple way (a little naieve): if the last 2 were passing, delete the first one logs = GenericFile.load_instance_from_solr(version.pid).logs(version.dsid) list = logs.limit(2) if list.size > 1 && (list[0].pass == 1) && (list[1].pass == 1) list[0].destroy end end end
Version data entries
22 entries across 22 versions & 2 rubygems