Class: ContentDepositErrorEventJob
- Inherits:
-
ContentEventJob
- Object
- ContentEventJob
- ContentDepositErrorEventJob
- 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
-
#depositor ⇒ Object
Returns the value of attribute depositor.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#repo_object ⇒ Object
Returns the value of attribute repo_object.
Instance Method Summary collapse
Instance Attribute Details
#depositor ⇒ Object
Returns the value of attribute depositor.
5 6 7 |
# File 'app/jobs/content_deposit_error_event_job.rb', line 5 def depositor @depositor end |
#reason ⇒ Object
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_object ⇒ Object
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
#action ⇒ Object
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 |