class ActiveJob::LogSubscriber

def enqueue_at(event)

def enqueue_at(event)
  job = event.payload[:job]
  ex = event.payload[:exception_object]
  if ex
    error do
      "Failed enqueuing #{job.class.name} to #{queue_name(event)}: #{ex.class} (#{ex.message})"
    end
  elsif event.payload[:aborted]
    info do
      "Failed enqueuing #{job.class.name} to #{queue_name(event)}, a before_enqueue callback halted the enqueuing execution."
    end
  else
    info do
      "Enqueued #{job.class.name} (Job ID: #{job.job_id}) to #{queue_name(event)} at #{scheduled_at(event)}" + args_info(job)
    end
  end
end