Class: Hyrax::Listeners::FileSetLifecycleListener

Inherits:
Object
  • Object
show all
Defined in:
app/services/hyrax/listeners/file_set_lifecycle_listener.rb

Overview

Listens for events related to Hydra Works FileSets

Instance Method Summary collapse

Instance Method Details

#on_file_set_attached(event) ⇒ Object

Parameters:

  • event (Dry::Event)

10
11
12
# File 'app/services/hyrax/listeners/file_set_lifecycle_listener.rb', line 10

def on_file_set_attached(event)
  FileSetAttachedEventJob.perform_later(event[:file_set], event[:user])
end

#on_file_set_restored(event) ⇒ Object

Parameters:

  • event (Dry::Event)

16
17
18
19
# File 'app/services/hyrax/listeners/file_set_lifecycle_listener.rb', line 16

def on_file_set_restored(event)
  ContentRestoredVersionEventJob
    .perform_later(event[:file_set], event[:user], event[:revision])
end