redis-stream 0.4.8 → 0.4.9

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
  SHA256:
3
- metadata.gz: ab254cc98aa3c461c62f9dccde417b1241b0439089877c886c58801636f31474
4
- data.tar.gz: 2d819cefbf659aa818a95ce7ca4da9e8e66dc4167562a325d0f6234cc897cd42
3
+ metadata.gz: 77216cc7a26260a9b4aab0a4a12e0c6c72b5ed409bbf39dc640bfbe1d4909e78
4
+ data.tar.gz: 5e95543bdc6422e4a6aadc4d2bf814b39b46446711930cea4fab603ea36ddbda
5
5
  SHA512:
6
- metadata.gz: 18a9436cf3f03318b69e28cf235df03b5053f1c6e203d8fd32f597b1a608403a91df92f83fecf79cf84313358ac9ca32e907d78a89fff427c271148967cf252d
7
- data.tar.gz: 880510e31555027b8943ae30905c6d45a1c6bca6b01910fef7875657dbb663667a3a4d1e76d237d83eb7790e1a95d4e43de43396b90c88f8d809a97d1a836551
6
+ metadata.gz: 55cc349e860a84d70faa65d4c07de1ab026fe32551fdeff0b2dfa1569396a03f0848657621e712746da9389030e683a0b4e2af8fd96ed075d016c863933d7d4e
7
+ data.tar.gz: ae445e58d4f25cfed485ff8e7b93716e1813b0df92b5d709e81d6fb596626422a8d4d60e5acd3cf1f4001834894b3cf64c7f2ddfba02f9f8847f0dacc89a88d9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- redis-stream (0.4.7)
4
+ redis-stream (0.4.8)
5
5
  connection_pool (~> 2.2)
6
6
  moneta (~> 1.2)
7
7
  multi_json (~> 1.14)
@@ -14,7 +14,7 @@ GEM
14
14
  connection_pool (2.2.2)
15
15
  json (2.3.0)
16
16
  minitest (5.13.0)
17
- moneta (1.2.1)
17
+ moneta (1.3.0)
18
18
  multi_json (1.14.1)
19
19
  opentracing (0.5.0)
20
20
  rake (13.0.1)
@@ -317,6 +317,7 @@ class Redis
317
317
  result = redis.xread(@stream, @lastid, block: 1000, count: 1) if @group.nil?
318
318
  result = redis.xreadgroup(@group, @consumer_id, @stream, '>', block: 1000, count: 1) if @group
319
319
  end
320
+
320
321
  unless result.empty?
321
322
  id, data_out = result[@stream][0]
322
323
  ack_count = 0
@@ -340,11 +341,13 @@ class Redis
340
341
  return false
341
342
  end
342
343
 
343
- unless (data_out["to"].nil? || data_out["to"].eql?('') || data_out["to"].eql?('*') || data_out["to"].eql?(@consumer_id)) &&
344
- (data_out["to_group"].nil? || data_out["to_group"].eql?('') || data_out["to_group"].eql?('*') || data_out["to_group"].eql?(@group))
345
- @logger.info("#{@consumer_id} - ignoring message from '#{data_out["from"]}' to '#{data_out["to"]}-#{data_out["to_group"]}'")
344
+ unless passthrough
345
+ unless (data_out["to"].nil? || data_out["to"].eql?('') || data_out["to"].eql?('*') || data_out["to"].eql?(@consumer_id)) &&
346
+ (data_out["to_group"].nil? || data_out["to_group"].eql?('') || data_out["to_group"].eql?('*') || data_out["to_group"].eql?(@group))
347
+ @logger.info("#{@consumer_id} - ignoring message from '#{data_out["from"]}' to '#{data_out["to"]}-#{data_out["to_group"]}'")
346
348
 
347
- return false
349
+ return false
350
+ end
348
351
  end
349
352
 
350
353
  @logger.info("#{@consumer_id} - received from '#{data_out["from"]}' of type '#{data_out['type']}' to '#{data_out["to"]}' in group '#{data_out["to_group"]}' with message id '#{id}' - with ack #{ack_count}")
@@ -355,7 +358,7 @@ class Redis
355
358
  end
356
359
 
357
360
  if data_out["type"].eql?(Redis::Stream::Type::PONG)
358
- return false
361
+ return true
359
362
  end
360
363
 
361
364
  return data_out unless async
@@ -1,6 +1,6 @@
1
1
  #encoding: UTF-8
2
2
  class Redis
3
3
  module Stream
4
- VERSION = "0.4.8"
4
+ VERSION = "0.4.9"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.8
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mehmet Celik