basicjrpc 0.1.54 → 0.1.55

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: 1a50bdaad064f8914e049227096b99a7b1f41774
4
- data.tar.gz: 8d0e61b1444119727ddd447d26d63a1007d0cc4b
3
+ metadata.gz: d4c9b60ca4e80e1eed0a83036234f79965268706
4
+ data.tar.gz: 20f046ee7f51f07ea7b7cfc9b70addf7115aa45c
5
5
  SHA512:
6
- metadata.gz: 968143d899be24449685637c604cff574b2e4f0e2f4f301dda63fdb885a1e3b64af9f4646e1fb4917a8b0e6b15dc6b0140bde40ad82ad23c5a883128c95637cc
7
- data.tar.gz: f0bb45c4781d8bd8df359ec52d6d7b88c9d4ea8e6403f8e03ff8aee4b5aa5a5e600eec362471b73e9246229f51cd8820d1f740e2922121f8d2c96688942878ba
6
+ metadata.gz: cfdb34b9e7e689f42d1629248c6cbb03814b239912673cfebb423897bd89c29b313837f823f42020030b842218cc4d708e5e0a72bc591502bed229ba6f275335
7
+ data.tar.gz: 823a33e80e11249266370883a6770f470c1be641d659705f31ccd2f03794937139c72d4febab43b1c1f59772cbb9fdbb8cdcf9006a9d7251ba09b0c06a9b199a
@@ -30,12 +30,9 @@ module BasicJRPC
30
30
 
31
31
  my_message = false
32
32
 
33
- #puts "Writing Message #{payload['message_id']} #{payload['method_name']}"
34
- #@nsq_producer.write(Oj.dump(payload))
35
33
  @redis.rpush(@queue, Oj.dump(payload, mode: :compat))
36
34
 
37
35
  Timeout::timeout(5) {
38
- ### OR USE POP AND LLEN
39
36
  Oj.load(@redis.blpop(payload['message_id'])[1], :symbol_keys => true)
40
37
  }
41
38
  rescue Exception => e
@@ -55,12 +52,10 @@ module BasicJRPC
55
52
  payload['message_id'] = SecureRandom.uuid
56
53
  payload['response'] = true
57
54
  payload['caller'] = caller.first(10)
58
- #@nsq_producer.write(Oj.dump(payload))
59
55
  @redis.rpush(@queue, Oj.dump(payload, mode: :compat))
60
56
  rescue Exception => e
61
57
  #terminate
62
58
  raise e
63
59
  end
64
60
  end
65
-
66
61
  end
@@ -15,20 +15,13 @@ module BasicJRPC
15
15
  next if redis_response.nil?
16
16
  message = redis_response[1]
17
17
 
18
- #message = @nsq_consumer.pop
19
-
20
18
  payload = Oj.load(message, :symbol_keys => true)
21
- #puts "Processing message #{payload.message_id} #{payload.method_name} #{payload.method_arguments} #{payload.callers}"
22
-
23
- # Should always return a data object
19
+
24
20
  response = @injected_class.send(payload.method_name, *payload.method_arguments)
25
21
 
26
22
  @redis.rpush(payload.message_id, Oj.dump(response, mode: :compat))
27
- #message.finish
28
23
  end
29
24
  rescue Exception => e
30
- #message.finish
31
- #terminate
32
25
  raise e
33
26
  end
34
27
 
@@ -1,3 +1,3 @@
1
1
  module BasicJRPC
2
- VERSION = "0.1.54"
2
+ VERSION = "0.1.55"
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.54
4
+ version: 0.1.55
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-11-05 00:00:00.000000000 Z
11
+ date: 2016-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler