Sha256: 20708752bb26dc5a6861bcff7fb42174395ca253a154448b539e2e1a8cb28b42

Contents?: true

Size: 563 Bytes

Versions: 13

Compression:

Stored size: 563 Bytes

Contents

class ContentDeleteEventJob < EventJob

  def run
    noid = Sufia::Noid.noidify(generic_file_id)
    action = "User #{link_to_profile depositor_id} has deleted file '#{noid}'"
    timestamp = Time.now.to_i
    depositor = User.find_by_user_key(depositor_id)
    # Create the event
    event = depositor.create_event(action, timestamp)
    # Log the event to the depositor's profile stream
    depositor.log_profile_event(event)
    # Fan out the event to all followers
    depositor.followers.each do |follower|
      follower.log_event(event)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
sufia-5.0.0 app/jobs/content_delete_event_job.rb
sufia-5.0.0.rc1 app/jobs/content_delete_event_job.rb
sufia-6.0.0.rc2 app/jobs/content_delete_event_job.rb
sufia-6.0.0.rc1 app/jobs/content_delete_event_job.rb
sufia-4.3.1 app/jobs/content_delete_event_job.rb
sufia-6.0.0.beta1 app/jobs/content_delete_event_job.rb
sufia-4.2.0 app/jobs/content_delete_event_job.rb
sufia-4.1.0 app/jobs/content_delete_event_job.rb
sufia-4.0.1 app/jobs/content_delete_event_job.rb
sufia-4.0.0 app/jobs/content_delete_event_job.rb
sufia-4.0.0.rc2 app/jobs/content_delete_event_job.rb
sufia-4.0.0.rc1 app/jobs/content_delete_event_job.rb
sufia-4.0.0.beta4 app/jobs/content_delete_event_job.rb