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 +4 -4
- data/lib/request_id/version.rb +1 -1
- data/lib/sidekiq/middleware/server/request_id.rb +10 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8856a6a5e319b628f1ed4250910bfd7d25dd8c05
|
4
|
+
data.tar.gz: e0a27815a01b39ceca79ce73e66e97200a36cbfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6867acf52cf09b17c07b97d67d79823720a6120f972dbd253b5871fc0b223f04e54269eec093f072546910a3347a7602f6fb697393a3b836db7e7dcb8749b3f2
|
7
|
+
data.tar.gz: 0564dd04447e5be593c7c73fd8a7e5c23458ed9104d419fa286eeec5dbda6fe29879939351d0941d91b416f9e670dfd220863cb5a523e9982478e0597a1aefab
|
data/lib/request_id/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2014-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|