Sha256: a07643c5ae8b667877faaa3b6b880c716f4ba24dc88f8301b3315b134fe23748

Contents?: true

Size: 721 Bytes

Versions: 45

Compression:

Stored size: 721 Bytes

Contents

require "pry"
require "active_job"
require "resque"
require "sentry-resque"

Sentry.init do |config|
  config.breadcrumbs_logger = [:sentry_logger]
  # replace it with your sentry dsn
  config.dsn = 'https://2fb45f003d054a7ea47feb45898f7649@o447951.ingest.sentry.io/5434472'
end

class MyJob < ActiveJob::Base
  self.queue_adapter = :resque

  def perform
    raise "foo"
  end
end

worker = Resque::Worker.new(:default)

MyJob.perform_later

begin
  worker.work(0)
rescue => e
  puts("active job failed because of \"#{e.message}\"")
end

class Foo
  def self.perform
    1 / 0
  end
end

Resque::Job.create(:default, Foo)

begin
  worker.work(0)
rescue => e
  puts("inline job failed because of \"#{e.message}\"")
end


Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
sentry-resque-5.2.1 example/app.rb
sentry-resque-5.2.0 example/app.rb
sentry-resque-5.1.1 example/app.rb
sentry-resque-5.1.0 example/app.rb
sentry-resque-5.0.2 example/app.rb
sentry-resque-5.0.1 example/app.rb
sentry-resque-5.0.0 example/app.rb
sentry-resque-4.9.2 example/app.rb
sentry-resque-4.9.1 example/app.rb
sentry-resque-4.9.0 example/app.rb
sentry-resque-4.8.3 example/app.rb
sentry-resque-4.8.2 example/app.rb
sentry-resque-4.8.1 example/app.rb
sentry-resque-4.8.0 example/app.rb
sentry-resque-4.7.3 example/app.rb
sentry-resque-4.7.2 example/app.rb
sentry-resque-4.7.1 example/app.rb
sentry-resque-4.7.0 example/app.rb
sentry-resque-4.6.5 example/app.rb
sentry-resque-4.6.4 example/app.rb