Class: ContentDepositErrorEventJob

Inherits:
ContentEventJob
  • Object
show all
Defined in:
app/jobs/content_deposit_error_event_job.rb

Overview

Log a concern deposit error to activity streams This class is also being ported to Hyrax itself. It can be removed from here once Hyrax has it

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#depositorObject

Returns the value of attribute depositor.



5
6
7
# File 'app/jobs/content_deposit_error_event_job.rb', line 5

def depositor
  @depositor
end

#reasonObject

Returns the value of attribute reason.



5
6
7
# File 'app/jobs/content_deposit_error_event_job.rb', line 5

def reason
  @reason
end

#repo_objectObject

Returns the value of attribute repo_object.



5
6
7
# File 'app/jobs/content_deposit_error_event_job.rb', line 5

def repo_object
  @repo_object
end

Instance Method Details

#actionObject



14
15
16
# File 'app/jobs/content_deposit_error_event_job.rb', line 14

def action
  "User #{link_to_profile depositor} deposit of #{link_to repo_object.title.first, polymorphic_path(repo_object)} has failed for #{reason}"
end

#perform(repo_object, depositor, reason: '') ⇒ Object



7
8
9
10
11
12
# File 'app/jobs/content_deposit_error_event_job.rb', line 7

def perform(repo_object, depositor, reason: '')
  self.reason = reason
  self.repo_object = repo_object
  self.depositor = depositor
  super(repo_object, depositor)
end