• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

payrollhero / dispatch-rider / #3015

02 Sep 2022 11:22PM UTC coverage: 0.409% (-84.7%) from 85.154%
#3015

push

web-flow
Layout/SpaceInsideStringInterpolation-20220901233630 (#89)

* :police_car: regenerate rubocop todo

* :police_car: Layout/SpaceInsideStringInterpolation

* :police_car: regenerate rubocop todo

Co-authored-by: Rubocop Challenger <rubocop@payrollhero.com>

0 of 1 new or added line in 1 file covered. (0.0%)

1529 existing lines in 63 files now uncovered.

7 of 1711 relevant lines covered (0.41%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/dispatch-rider/handlers/base.rb
UNCOV
1
module DispatchRider
×
UNCOV
2
  module Handlers
×
UNCOV
3
    class Base
×
UNCOV
4
      include NamedProcess
×
UNCOV
5
      extend InheritanceTracking
×
6
      
UNCOV
7
      class << self
×
UNCOV
8
        def set_default_retry( amount ) 
×
UNCOV
9
          define_method(:retry_timeout) do
×
10
            amount
×
UNCOV
11
          end
×
UNCOV
12
        end
×
UNCOV
13
      end
×
14
      
UNCOV
15
      attr_reader :raw_message
×
16

UNCOV
17
      def do_process(raw_message)
×
UNCOV
18
        with_named_process(raw_message) do
×
UNCOV
19
          @raw_message = raw_message
×
UNCOV
20
          process(raw_message.body)
×
UNCOV
21
        end
×
UNCOV
22
      rescue Exception => e
×
UNCOV
23
        self.retry if self.retry_on_failure?
×
UNCOV
24
        raise e
×
UNCOV
25
      end
×
26

UNCOV
27
      def process(message)
×
UNCOV
28
        raise NotImplementedError, "Method 'process' not overridden in subclass!"
×
UNCOV
29
      end
×
30
      
UNCOV
31
      protected
×
32
      
UNCOV
33
      def extend_timeout(timeout)
×
UNCOV
34
        raw_message.extend_timeout(timeout)
×
UNCOV
35
      end
×
36
      
UNCOV
37
      def return_to_queue
×
UNCOV
38
        raw_message.return_to_queue
×
UNCOV
39
      end
×
40
      
UNCOV
41
      def retry
×
UNCOV
42
        timeout = retry_timeout
×
UNCOV
43
        case timeout
×
UNCOV
44
        when :immediate
×
UNCOV
45
          return_to_queue
×
UNCOV
46
        else
×
UNCOV
47
          extend_timeout(timeout)
×
UNCOV
48
        end
×
UNCOV
49
      end
×
50
      
UNCOV
51
      def retry_on_failure?
×
UNCOV
52
        self.respond_to? :retry_timeout
×
UNCOV
53
      end
×
UNCOV
54
    end
×
UNCOV
55
  end
×
UNCOV
56
end
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc