dispatch-rider 1.2.7 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 252461672ed1c07fd24c7cc83540caff83a12e9f
4
- data.tar.gz: 07a439f4a66e1ac9e3a1b66ad3d57e318cd371f4
3
+ metadata.gz: e4ecc3cb31c588f86ad0fb803347f98752458ca2
4
+ data.tar.gz: 5945c905356d231948477a34104e7ebcbf9c385e
5
5
  SHA512:
6
- metadata.gz: a202f8492f998807bd0025d0662bd461d7942b39e2e3e44b8d441b2a0cd4c298ee5c3ef831d604f70056651ba424e21b48560033326b1c51d78d61357da730f6
7
- data.tar.gz: dae8558b1ce89a6f775b712ba5aed8af08d1ba800ebd9359b7bd2f327306a8453c59d8d6d7520998afa07b6c6b41cb6cfaf87162fa08e0023d957187e68bc53b
6
+ metadata.gz: e68f71bac1ba5447ccca27a199ea2a08f5a869601d7a760926f27d348537d902aafc9878050ece7b755010a9d26fa5b1631130c0dc836d71e7909774af8fcdad
7
+ data.tar.gz: 792dc04c2eea1c68c573889ebefe4c39c9b7fe200e6895922eade10b12a24da6f91d9a333240fe1872df7131f65933939e95218fa908fc56d0aa44a33cf315b6
@@ -1,5 +1,5 @@
1
1
  if defined? Appsignal
2
- Appsignal.logger.info('Loading Dispatch Rider integration')
2
+ ::Appsignal.logger.info('Loading Dispatch Rider integration')
3
3
 
4
4
  module DispatchRider
5
5
  module Integrations
@@ -7,9 +7,9 @@ if defined? Appsignal
7
7
 
8
8
  def self.wrap_message(job, message)
9
9
  begin
10
- Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
10
+ ::Appsignal::Transaction.create(SecureRandom.uuid, ENV.to_hash)
11
11
 
12
- ActiveSupport::Notifications.instrument(
12
+ ::ActiveSupport::Notifications.instrument(
13
13
  'perform_job.dispatch-rider',
14
14
  :class => message.subject,
15
15
  :method => 'handle',
@@ -20,12 +20,12 @@ if defined? Appsignal
20
20
  job.call
21
21
  end
22
22
  rescue Exception => exception
23
- unless Appsignal.is_ignored_exception?(exception)
24
- Appsignal::Transaction.current.add_exception(exception)
23
+ unless ::Appsignal.is_ignored_exception?(exception)
24
+ ::Appsignal::Transaction.current.add_exception(exception)
25
25
  end
26
26
  raise exception
27
27
  ensure
28
- Appsignal::Transaction.current.complete!
28
+ ::Appsignal::Transaction.current.complete!
29
29
  end
30
30
  end
31
31
 
@@ -33,17 +33,16 @@ if defined? Appsignal
33
33
  end
34
34
  end
35
35
 
36
- if Appsignal.active?
37
- Appsignal.start
38
-
39
- DispatchRider.configure do |config|
40
-
41
- config.around(:dispatch_message) do |job, message|
42
- DispatchRider::Integrations::Appsignal.wrap_message(job, message)
43
- end
36
+ DispatchRider.configure do |config|
44
37
 
38
+ config.around(:dispatch_message) do |job, message|
39
+ DispatchRider::Integrations::Appsignal.wrap_message(job, message)
45
40
  end
46
41
 
47
42
  end
48
43
 
44
+ if ::Appsignal.active?
45
+ ::Appsignal.start
46
+ end
47
+
49
48
  end
@@ -5,6 +5,7 @@ module DispatchRider
5
5
  attr_reader :total_timeout, :start_time
6
6
 
7
7
  def initialize(message, raw_item, queue)
8
+ @queue = queue
8
9
  @total_timeout = queue.visibility_timeout
9
10
  @start_time = Time.now
10
11
  super(message, raw_item)
@@ -37,7 +38,7 @@ module DispatchRider
37
38
  end
38
39
 
39
40
  def queue_name
40
- queue.arn.split(':').last
41
+ @queue.arn.split(':').last
41
42
  end
42
43
 
43
44
  end
@@ -1,4 +1,4 @@
1
1
  # This file specifies the current version of the gem.
2
2
  module DispatchRider
3
- VERSION = "1.2.7"
3
+ VERSION = "1.2.8"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dispatch-rider
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suman Mukherjee