1
0
Fork 0

Add RavenJob

This commit is contained in:
Alex Kotov 2018-12-11 16:01:53 +05:00
parent 6bd153f46d
commit 32ce4cc2df
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
3 changed files with 17 additions and 0 deletions

9
app/jobs/raven_job.rb Normal file
View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
class RavenJob < ApplicationJob
queue_as :default
def perform(event)
Raven.send_event event
end
end

View file

@ -3,6 +3,7 @@
# Be sure to restart your server when you modify this file. # Be sure to restart your server when you modify this file.
Raven.configure do |config| Raven.configure do |config|
config.async = RavenJob.method :perform_later
config.current_environment = Rails.env config.current_environment = Rails.env
config.dsn = Rails.application.credentials.raven_dsn config.dsn = Rails.application.credentials.raven_dsn
config.environments = %w[production] config.environments = %w[production]

View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe RavenJob do
pending "add some examples to (or delete) #{__FILE__}"
end