Sha256: 46a433f1ff7a7223386c82cd7c94712392d5ccb93e16d4dcef542204bafeb1f7

Contents?: true

Size: 755 Bytes

Versions: 2

Compression:

Stored size: 755 Bytes

Contents

class SomeException < RuntimeError
end

class SomeOtherException < RuntimeError
end

module Jobs
  module Tests
    class LockedTestJob < QueueClassicPlus::Base
      lock!

      @queue = :low
      retry! on: SomeException, max: 5

      def self.perform should_raise
        raise SomeException if should_raise
      end
    end


    class TestJobNoRetry < QueueClassicPlus::Base
      class Custom < RuntimeError
      end

      @queue = :low

      def self.perform should_raise
        raise Custom if should_raise
      end
    end


    class TestJob < QueueClassicPlus::Base
      @queue = :low
      retry! on: SomeException, max: 5

      def self.perform should_raise
        raise SomeException if should_raise
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
queue_classic_plus-1.0.0.alpha2 spec/sample_jobs.rb
queue_classic_plus-0.0.2 spec/sample_jobs.rb