# A generic job for sending events to a user.
#
# This class does not implement a usable action, so it must be implemented in a child class
#
class EventJob < ActiveJob::Base
  include Rails.application.routes.url_helpers
  include ActionView::Helpers
  include ActionView::Helpers::DateHelper
  include Hydra::AccessControlsEnforcement
  include HyraxHelper

  queue_as Hyrax.config.ingest_queue_name
  attr_reader :depositor

  # @param [User] depositor the user to create the event for
  def perform(depositor)
    @depositor = depositor
    # Log the event to the depositor's profile stream
    log_user_event(depositor)
  end

  # override to provide your specific action for the event you are logging
  # @abstract
  def action
    raise(NotImplementedError, "#action should be implemented by an child class of EventJob")
  end

  # create an event with an action and a timestamp for the user
  def event
    @event ||= Hyrax::Event.create(action, Time.current.to_i)
  end

  # log the event to the users event stream
  def log_user_event(depositor)
    depositor.log_event(event)
  end
end

# A generic job for sending events to a user.
#
# @abstract
class EventJob < ActiveJob::Base
  include Rails.application.routes.url_helpers
  # For link_to
  include ActionView::Helpers
  # For link_to_profile
  include HyraxHelper

  queue_as Hyrax.config.ingest_queue_name
  attr_reader :depositor

  # @param [User] depositor the user to create the event for
  def perform(depositor)
    @depositor = depositor
    # Log the event to the depositor's profile stream
    log_user_event(depositor)
  end

  # override to provide your specific action for the event you are logging
  # @abstract
  def action
    raise(NotImplementedError, "#action should be implemented by an child class of EventJob")
  end

  # create an event with an action and a timestamp for the user
  def event
    @event ||= Hyrax::Event.create(action, Time.current.to_i)
  end

  # log the event to the users event stream
  def log_user_event(depositor)
    depositor.log_event(event)
  end
end

Remove unused mixins from EventJob
Remove unused mixins from EventJob

Reverts part of
https://github.com/projecthydra-labs/hyrax/commit/a397bd67277bfc2ccb83e4a637e4a2f53850fd7a

I don't think these mixins were ever doing anything useful
