Class: AuditJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- AuditJob
- Defined in:
- app/jobs/audit_job.rb
Instance Method Summary collapse
-
#perform(file_set, file_id, uri) ⇒ Object
URI of the resource to audit.
Instance Method Details
#perform(file_set, file_id, uri) ⇒ Object
URI of the resource to audit. This URI could include the actual resource (e.g. content) and the version to audit:
http://localhost:8983/fedora/rest/test/a/b/c/abcxyz/content/fcr:versions/version1
but it could also just be:
http://localhost:8983/fedora/rest/test/a/b/c/abcxyz/content
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/jobs/audit_job.rb', line 10 def perform(file_set, file_id, uri) log = run_audit(file_set, file_id, uri) fixity_ok = log.pass == 1 unless fixity_ok if CurationConcerns.config.callback.set?(:after_audit_failure) login = file_set.depositor user = User.find_by_user_key(login) CurationConcerns.config.callback.run(:after_audit_failure, file_set, user, log.created_at) end end fixity_ok end |