barbeque_client 0.8.2 → 0.9.0
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 +4 -4
- data/README.md +11 -0
- data/lib/barbeque_client.rb +1 -0
- data/lib/barbeque_client/client.rb +9 -5
- data/lib/barbeque_client/configuration.rb +1 -0
- data/lib/barbeque_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 748ec0cb5187daebfd967612382bab3a5ad03f78
|
4
|
+
data.tar.gz: 288db468ba9799658c041b5dc93c67ea94a91a35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75408cd176b18f791e9db63cc89703c9e8bd76f14a09f7fb9baea0aa89f11d7e05e75fc9f717774efc533d399309cae9fa711b3df6491558e7ebfe423a22e029
|
7
|
+
data.tar.gz: 2acbd9be2231e8ae3c9fbec2665634f0dac79c1e712592c79a79ac02d6c9aae2ab02c8ba97eee5265c00118aa3a718b4d195c5428a2e8699f8d0415b7fcb110e
|
data/README.md
CHANGED
@@ -39,3 +39,14 @@ execution.status #=> "pending"
|
|
39
39
|
message_id = "a3c653c1-335e-4d4d-a6f9-eb91c0253d02"
|
40
40
|
BarbequeClient.status(message_id: message_id) #=> "success"
|
41
41
|
```
|
42
|
+
|
43
|
+
### Distributed tracing
|
44
|
+
Configure `tracing` option. Pick one of supported tracers.
|
45
|
+
See more detail in https://github.com/cookpad/garage_client#tracing.
|
46
|
+
|
47
|
+
```
|
48
|
+
BarbequeClient.configure do |config|
|
49
|
+
# ...
|
50
|
+
config.tracing = { tracer: 'aws-xray', service: 'barbeque' }
|
51
|
+
end
|
52
|
+
```
|
data/lib/barbeque_client.rb
CHANGED
@@ -3,10 +3,11 @@ require 'json'
|
|
3
3
|
|
4
4
|
module BarbequeClient
|
5
5
|
class Client
|
6
|
-
def initialize(application:, default_queue:, endpoint:)
|
6
|
+
def initialize(application:, default_queue:, endpoint:, tracing: {})
|
7
7
|
@application = application
|
8
8
|
@default_queue = default_queue
|
9
9
|
@endpoint = endpoint
|
10
|
+
@tracing = tracing
|
10
11
|
end
|
11
12
|
|
12
13
|
# @param [String] job - Job name to enqueue.
|
@@ -50,10 +51,13 @@ module BarbequeClient
|
|
50
51
|
private
|
51
52
|
|
52
53
|
def garage_client
|
53
|
-
@garage_client ||= GarageClient::Client.new(
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
@garage_client ||= GarageClient::Client.new(garage_client_option)
|
55
|
+
end
|
56
|
+
|
57
|
+
def garage_client_option
|
58
|
+
option = { endpoint: @endpoint, path_prefix: '/' }
|
59
|
+
option[:tracing] = @tracing if @tracing[:tracer]
|
60
|
+
option
|
57
61
|
end
|
58
62
|
end
|
59
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: barbeque_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takashi Kokubun
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: garage_client
|
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
version: '0'
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.6.
|
159
|
+
rubygems_version: 2.6.11
|
160
160
|
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: Barbeque client for Ruby
|