Sha256: 4e7eeb988362ba69113023b8945beedffdab08d6c0cbd5940648dbb0b58588c4

Contents?: true

Size: 527 Bytes

Versions: 18

Compression:

Stored size: 527 Bytes

Contents

class ContentDeleteEventJob < EventJob


  def run
    action = "User #{link_to_profile depositor_id} has deleted file '#{generic_file_id}'"
    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

18 entries across 18 versions & 1 rubygems

Version Path
sufia-4.0.0.beta3 app/jobs/content_delete_event_job.rb
sufia-4.0.0.beta2 app/jobs/content_delete_event_job.rb
sufia-4.0.0.beta1 app/jobs/content_delete_event_job.rb
sufia-3.7.2 app/jobs/content_delete_event_job.rb
sufia-3.7.1 app/jobs/content_delete_event_job.rb
sufia-3.7.0 app/jobs/content_delete_event_job.rb
sufia-3.6.1 app/jobs/content_delete_event_job.rb
sufia-3.6.0 app/jobs/content_delete_event_job.rb
sufia-3.5.0 app/jobs/content_delete_event_job.rb
sufia-3.4.0 app/jobs/content_delete_event_job.rb
sufia-3.4.0.rc4 app/jobs/content_delete_event_job.rb
sufia-3.4.0.rc3 app/jobs/content_delete_event_job.rb
sufia-3.3.1 app/jobs/content_delete_event_job.rb
sufia-3.4.0.rc2 app/jobs/content_delete_event_job.rb
sufia-3.4.0.rc1 app/jobs/content_delete_event_job.rb
sufia-3.3.0 app/jobs/content_delete_event_job.rb
sufia-3.2.1 app/jobs/content_delete_event_job.rb
sufia-3.1.3 app/jobs/content_delete_event_job.rb