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.16.1 example/app.rb
sentry-resque-5.16.0 example/app.rb
sentry-resque-5.15.2 example/app.rb
sentry-resque-5.15.1 example/app.rb
sentry-resque-5.15.0 example/app.rb
sentry-resque-5.14.0 example/app.rb
sentry-resque-5.13.0 example/app.rb
sentry-resque-5.12.0 example/app.rb
sentry-resque-5.11.0 example/app.rb
sentry-resque-5.10.0 example/app.rb
sentry-resque-5.9.0 example/app.rb
sentry-resque-5.8.0 example/app.rb
sentry-resque-5.7.0 example/app.rb
sentry-resque-5.6.0 example/app.rb
sentry-resque-5.5.0 example/app.rb
sentry-resque-5.4.2 example/app.rb
sentry-resque-5.4.1 example/app.rb
sentry-resque-5.4.0 example/app.rb
sentry-resque-5.3.1 example/app.rb
sentry-resque-5.3.0 example/app.rb