Sha256: 67c1a371e04ba036cce7e43688781528f3d7a24cfc988ba9becc90fb9fee61a8
Contents?: true
Size: 1017 Bytes
Versions: 8
Compression:
Stored size: 1017 Bytes
Contents
# frozen_string_literal: true module Hyrax module Listeners ## # Listens for events related to Hydra Works FileSets and sends # notifications where needed. class FileSetLifecycleNotificationListener ## # Send a notification to the depositor for failed checksum audits. # # @param event [Dry::Event] def on_file_set_audited(event) return unless event[:result] == :failure # do nothing on success Hyrax.logger.error "FIXITY CHECK FAILURE: Fixity failed for #{event[:audit_log]}" Hyrax::FixityCheckFailureService .new(event[:file_set], checksum_audit_log: event[:audit_log]) .call end ## # Send a notification to the depositing user for FileSet url import # failures. # # @param event [Dry::Event] def on_file_set_url_imported(event) Hyrax::ImportUrlFailureService.new(event[:file_set], event[:user]).call if event[:result] == :failure end end end end
Version data entries
8 entries across 8 versions & 1 rubygems