request_id 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32098034b450d59355544d24586315a661db4476
4
- data.tar.gz: be4cf3f3dbd644c9a35d9acd55961fff6eabbf23
3
+ metadata.gz: 8856a6a5e319b628f1ed4250910bfd7d25dd8c05
4
+ data.tar.gz: e0a27815a01b39ceca79ce73e66e97200a36cbfd
5
5
  SHA512:
6
- metadata.gz: 066273aa2c77438d5c12be5f4b5be07f5ae194e4fe6d1a8df3b2c99256e4f80e5f4f182a6bed87093aa9ed2ed8802d236ad13f48e97e5182f663feda22afe736
7
- data.tar.gz: 1f66869a4275451097a7742b4a9a18c4566670e51293451b867b3562c07a773cd68fa51118d51b5f9cb8576efc78acb2e4d2a62e25f9704308abe0d0f6a0e8ce
6
+ metadata.gz: 6867acf52cf09b17c07b97d67d79823720a6120f972dbd253b5871fc0b223f04e54269eec093f072546910a3347a7602f6fb697393a3b836db7e7dcb8749b3f2
7
+ data.tar.gz: 0564dd04447e5be593c7c73fd8a7e5c23458ed9104d419fa286eeec5dbda6fe29879939351d0941d91b416f9e670dfd220863cb5a523e9982478e0597a1aefab
@@ -1,3 +1,3 @@
1
1
  module RequestId
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
  end
@@ -1,7 +1,16 @@
1
+ begin
2
+ require 'sidekiq/middleware/server/logging'
3
+ rescue LoadError
4
+ # No sidekiq
5
+ end
6
+
1
7
  module Sidekiq
2
8
  module Middleware
3
9
  module Server
4
10
  class RequestId < Logging
11
+ class << self
12
+ attr_accessor :no_reset
13
+ end
5
14
 
6
15
  def call(worker, item, queue)
7
16
  request_id = ::RequestId.request_id = item['request_id']
@@ -17,7 +26,7 @@ module Sidekiq
17
26
  end
18
27
  end
19
28
  ensure
20
- ::RequestId.request_id = nil
29
+ ::RequestId.request_id = nil unless self.class.no_reset
21
30
  end
22
31
 
23
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric J. Holmes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-12 00:00:00.000000000 Z
11
+ date: 2014-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler