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