Sha256: ecb9be5a402c7795423b955ef6bc8ea5f7905c6863444b113c0ae22729e73ca6
Contents?: true
Size: 725 Bytes
Versions: 21
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true module Hyrax module Listeners ## # Listens for events related to batch activity and creates notifications class BatchNotificationListener ## # Notify requesting users of batch success/failure # # Called when 'batch.created' event is published # @param [Dry::Events::Event] event # @return [void] def on_batch_created(event) case event[:result] when :success Hyrax::BatchCreateSuccessService .new(event[:user]) .call when :failure Hyrax::BatchCreateFailureService .new(event[:user], event[:messages]) .call end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems