istox 0.1.141 → 0.1.142
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +14 -14
- data/istox.gemspec +1 -1
- data/lib/istox/helpers/grpc_client.rb +19 -1
- data/lib/istox/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f12e2a04dc4fcb089b33a43ae11a0b476fff150947dfa61216ae03f11d2552c
|
4
|
+
data.tar.gz: 72a1f3d5ee725ea0499f7b87a67933d48a7cc76d9988fb5270e7491b556521db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a846f6a61a57de7018a983422a1f800441ebe89b308d373d7c8f951177240b0be4a22ee12adea9ef19e716e0a2aa7acc1e286924a063dc6c7fc45eee7aeaebb
|
7
|
+
data.tar.gz: 956e5ff28171c2471a56bd4aaaaa068a705007cc7e049490c49177e78ac6947bddd6d9d1c19a421d84f714b27ee01f70b0bf8afa042f8a37d94e4d6320018bbb
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
istox (0.1.
|
4
|
+
istox (0.1.141.pre.4)
|
5
5
|
awesome_print
|
6
6
|
binding_of_caller
|
7
7
|
bunny (>= 2.12.0)
|
8
8
|
graphlient
|
9
9
|
gruf
|
10
10
|
hashie (~> 3.5.7)
|
11
|
-
istox_gruf
|
11
|
+
istox_gruf (~> 2.7.3)
|
12
12
|
listen (~> 3.0.5)
|
13
13
|
ougai
|
14
14
|
paranoia (~> 2.2)
|
@@ -61,10 +61,10 @@ GEM
|
|
61
61
|
i18n (>= 0.7, < 2)
|
62
62
|
minitest (~> 5.1)
|
63
63
|
tzinfo (~> 1.1)
|
64
|
-
amq-protocol (2.3.
|
64
|
+
amq-protocol (2.3.1)
|
65
65
|
arel (9.0.0)
|
66
66
|
awesome_print (1.8.0)
|
67
|
-
aws-eventstream (1.0
|
67
|
+
aws-eventstream (1.1.0)
|
68
68
|
aws-sigv4 (1.1.1)
|
69
69
|
aws-eventstream (~> 1.0, >= 1.0.2)
|
70
70
|
binding_of_caller (0.8.0)
|
@@ -73,8 +73,8 @@ GEM
|
|
73
73
|
bullet (5.7.6)
|
74
74
|
activesupport (>= 3.0.0)
|
75
75
|
uniform_notifier (~> 1.11.0)
|
76
|
-
bunny (2.
|
77
|
-
amq-protocol (~> 2.3, >= 2.3.
|
76
|
+
bunny (2.15.0)
|
77
|
+
amq-protocol (~> 2.3, >= 2.3.1)
|
78
78
|
coderay (1.1.2)
|
79
79
|
concurrent-ruby (1.1.6)
|
80
80
|
crass (1.0.6)
|
@@ -98,21 +98,21 @@ GEM
|
|
98
98
|
ffi (1.12.2)
|
99
99
|
globalid (0.4.2)
|
100
100
|
activesupport (>= 4.2.0)
|
101
|
-
google-protobuf (3.11.4
|
102
|
-
googleapis-common-protos-types (1.0.
|
103
|
-
google-protobuf (~> 3.
|
101
|
+
google-protobuf (3.11.4)
|
102
|
+
googleapis-common-protos-types (1.0.5)
|
103
|
+
google-protobuf (~> 3.11)
|
104
104
|
graphlient (0.3.7)
|
105
105
|
faraday
|
106
106
|
faraday_middleware
|
107
107
|
graphql-client
|
108
|
-
graphql (1.10.
|
108
|
+
graphql (1.10.6)
|
109
109
|
graphql-client (0.16.0)
|
110
110
|
activesupport (>= 3.0)
|
111
111
|
graphql (~> 1.8)
|
112
|
-
grpc (1.
|
112
|
+
grpc (1.28.0)
|
113
113
|
google-protobuf (~> 3.11)
|
114
114
|
googleapis-common-protos-types (~> 1.0)
|
115
|
-
grpc-tools (1.
|
115
|
+
grpc-tools (1.28.0)
|
116
116
|
gruf (2.8.1)
|
117
117
|
activesupport (> 4)
|
118
118
|
concurrent-ruby (> 1)
|
@@ -122,7 +122,7 @@ GEM
|
|
122
122
|
hashie (3.5.7)
|
123
123
|
i18n (0.9.5)
|
124
124
|
concurrent-ruby (~> 1.0)
|
125
|
-
istox_gruf (2.7.
|
125
|
+
istox_gruf (2.7.3)
|
126
126
|
activesupport (> 4)
|
127
127
|
concurrent-ruby (> 1)
|
128
128
|
grpc (~> 1.10)
|
@@ -147,7 +147,7 @@ GEM
|
|
147
147
|
nio4r (2.3.1)
|
148
148
|
nokogiri (1.10.9)
|
149
149
|
mini_portile2 (~> 2.4.0)
|
150
|
-
oj (3.10.
|
150
|
+
oj (3.10.6)
|
151
151
|
ougai (1.8.3)
|
152
152
|
oj (~> 3.10)
|
153
153
|
paranoia (2.4.2)
|
data/istox.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_dependency 'graphlient'
|
37
37
|
spec.add_dependency 'gruf'
|
38
38
|
spec.add_dependency 'hashie', '~> 3.5.7'
|
39
|
-
spec.add_dependency 'istox_gruf'
|
39
|
+
spec.add_dependency 'istox_gruf', '~> 2.7.3'
|
40
40
|
spec.add_dependency 'listen', '~> 3.0.5'
|
41
41
|
spec.add_dependency 'ougai'
|
42
42
|
spec.add_dependency 'paranoia', '~> 2.2'
|
@@ -17,6 +17,18 @@ module Istox
|
|
17
17
|
# execute(host_type, service, method, **keyword_args)
|
18
18
|
end
|
19
19
|
|
20
|
+
def default_channel_options
|
21
|
+
{
|
22
|
+
'grpc.keepalive_time_ms' => 10_000, # send keepalive ping every 10 second, default is 2 hours
|
23
|
+
'grpc.keepalive_timeout_ms' => 5000, # keepalive ping time out after 5 seconds, default is 20 seoncds
|
24
|
+
'grpc.keepalive_permit_without_calls' => 1, # allow keepalive pings when there's no gRPC calls
|
25
|
+
'grpc.http2.max_pings_without_data' => 0, # allow unlimited amount of keepalive pings without data
|
26
|
+
'grpc.http2.min_time_between_pings_ms' => 10_000, # allow grpc pings from client every 10 seconds
|
27
|
+
'grpc.http2.min_ping_interval_without_data_ms' => 5000, # allow grpc pings from client without data every 5 seconds
|
28
|
+
'grpc.http2.max_ping_strikes' => 2 # How many misbehaving pings the server can bear before sending goaway and closing the transport
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
20
32
|
private
|
21
33
|
|
22
34
|
def execute(host_type, service, method, **keyword_args)
|
@@ -53,13 +65,19 @@ module Istox
|
|
53
65
|
|
54
66
|
log.info 'Reinitiating to grpc host at ' + host_url
|
55
67
|
t1 = Time.now
|
56
|
-
@@services[get_key(host_type, service)] = ::Gruf::Client.new(service: service, options: { hostname: host_url })
|
68
|
+
@@services[get_key(host_type, service)] = ::Gruf::Client.new(service: service, options: { hostname: host_url }, client_options: channel_options)
|
57
69
|
log.info "Time taken for reinitiating grpc host: #{Time.now - t1} seconds"
|
58
70
|
end
|
59
71
|
|
60
72
|
def get_key(host_type, service)
|
61
73
|
host_type.to_s + service.to_s
|
62
74
|
end
|
75
|
+
|
76
|
+
def channel_options
|
77
|
+
{
|
78
|
+
channel_args: default_channel_options
|
79
|
+
}
|
80
|
+
end
|
63
81
|
end
|
64
82
|
end
|
65
83
|
end
|
data/lib/istox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: istox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.142
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siong Leng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: awesome_print
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: istox_gruf
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 2.7.3
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 2.7.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: listen
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|