Sha256: 6b9e9bab9cc5e53b0e0aa9d8facf23a3e236cd6b4b0f2bbadd8b9e861777bb38
Contents?: true
Size: 639 Bytes
Versions: 8
Compression:
Stored size: 639 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 # # @param event [Dry::Event] 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
8 entries across 8 versions & 1 rubygems