basicjrpc 0.1.16 → 0.1.17

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: 7301312a7ef206d91737a9279d769c30a7940457
4
- data.tar.gz: 043243f849b8b423fc81888f097a1b572ec4f9af
3
+ metadata.gz: e9516c5d90f04651e063715b9644685b17caea30
4
+ data.tar.gz: 96e15bf65746faf2a7b270034a9ffeb230d1abc3
5
5
  SHA512:
6
- metadata.gz: c2fbd9c5537edc364d2329b1959a04aae0f6d4190db77b40bf01f31844ab796c5e91f6accdcdf1d4351caffe828eef4d7eda12171844adc8f7399ce0448dae4b
7
- data.tar.gz: c1374666e600975f29f09eba7c33b469e05b5cd30e358addff944eaa9f96b890645dc082f0cc8204899429fbacfc97f37a07f223f8bdc1275bcf81238ada44e9
6
+ metadata.gz: 1cc88c35aa68b919daccc5ad22ed568fcd2e2ab0709326703b8312e6ce7893aa84c285d41f9f6d4384ae7871f8e537d688dd39c826f69a679991d192542b3202
7
+ data.tar.gz: 090756349de47093797d28457624c7cc5225929db32933444e8249baf8f2e60919bf29f4b124f7523690422360db4bb087cfabbf6a3b38d67898424e8f9573b4
@@ -2,10 +2,11 @@ module BasicJRPC
2
2
 
3
3
  # Responding Client
4
4
  class Client
5
- def initialize(queue)
5
+ def initialize(queue, timeout = 5)
6
6
  @redis = Redis.new(host: "redis")
7
7
  @queue = queue
8
8
  @payload = nil
9
+ @timeout = timeout
9
10
  end
10
11
 
11
12
  def method_missing(m, *args, &block)
@@ -16,7 +17,7 @@ module BasicJRPC
16
17
  payload.response_requested = true
17
18
  @redis.rpush(@queue, Oj.dump(payload))
18
19
 
19
- Timeout::timeout(5) {
20
+ Timeout::timeout(timeout) {
20
21
  return Oj.load(@redis.blpop(payload.message_id)[1])
21
22
  }
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module BasicJRPC
2
- VERSION = "0.1.16"
2
+ VERSION = "0.1.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basicjrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Simpson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-28 00:00:00.000000000 Z
11
+ date: 2016-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler