Sha256: f446f5424d63e3f90df694066a432b30dfc13031ae53611908d974b60f88e0ad

Contents?: true

Size: 705 Bytes

Versions: 10

Compression:

Stored size: 705 Bytes

Contents

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

10 entries across 10 versions & 1 rubygems

Version Path
sentry-resque-5.20.1 example/app.rb
sentry-resque-5.20.0 example/app.rb
sentry-resque-5.19.0 example/app.rb
sentry-resque-5.18.2 example/app.rb
sentry-resque-5.18.1 example/app.rb
sentry-resque-5.18.0 example/app.rb
sentry-resque-5.17.3 example/app.rb
sentry-resque-5.17.2 example/app.rb
sentry-resque-5.17.1 example/app.rb
sentry-resque-5.17.0 example/app.rb