captainu-tincan 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tincan/sender.rb +1 -0
- data/lib/tincan/version.rb +1 -1
- data/spec/receiver_spec.rb +2 -2
- data/spec/sender_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b929c88f6a7ec74fb30d0da1fa49907c8a12a68
|
4
|
+
data.tar.gz: d405d5dab938552c06929657e25f4d8b2d190ff6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f133f80912c16ab83d91a1caf20eeeb08c8face23a89a40044f73c1f9348ecd346126c4011f5a647d7c376ff17ed979e897b58829b009f80c7dd617a8b8efa2
|
7
|
+
data.tar.gz: c49f562ec6d0fa8110540f85155368102490d1a2427648cf0aedd2c7f94ede77f82570a4b1a55591d663bd3855347fe79e95b49e55a72ebc16f7eb19ac34e34a
|
data/lib/tincan/sender.rb
CHANGED
@@ -43,6 +43,7 @@ module Tincan
|
|
43
43
|
# from the returned list of receiver list keys.
|
44
44
|
# @return [Array] An array of keys identifying all receiver pointer lists.
|
45
45
|
def keys_for_receivers(object_name, exclude: [])
|
46
|
+
exclude ||= []
|
46
47
|
receiver_list_key = key_for_elements(object_name, 'receivers')
|
47
48
|
receivers = redis_client.smembers(receiver_list_key)
|
48
49
|
receivers.reject { |r| exclude.include?(r) }.map do |receiver|
|
data/lib/tincan/version.rb
CHANGED
data/spec/receiver_spec.rb
CHANGED
@@ -143,8 +143,8 @@ describe Tincan::Receiver do
|
|
143
143
|
thread.kill
|
144
144
|
end
|
145
145
|
|
146
|
-
|
147
|
-
pending '
|
146
|
+
it 'calls a stored exception block on failure and keeps on ticking' do
|
147
|
+
pending 'Sometimes fails when part of an entire run, but not by itself.'
|
148
148
|
thread = Thread.new { receiver.listen }
|
149
149
|
|
150
150
|
get_receivers = -> { redis.smembers('data:object_one:receivers') }
|
data/spec/sender_spec.rb
CHANGED
@@ -57,6 +57,12 @@ describe Tincan::Sender do
|
|
57
57
|
result = sender.keys_for_receivers('object', exclude: 'bork')
|
58
58
|
expect(result).to eq(%w(data:object:some_client:messages))
|
59
59
|
end
|
60
|
+
|
61
|
+
it 'can handle an nil list of clients to exclude' do
|
62
|
+
redis.sadd('data:object:receivers', 'bork')
|
63
|
+
result = sender.keys_for_receivers('object', exclude: nil)
|
64
|
+
expect(result).to eq(%w(data:object:bork:messages data:object:some_client:messages))
|
65
|
+
end
|
60
66
|
end
|
61
67
|
|
62
68
|
describe :flush_all_queues_for_object do
|