google-pubsub-enhancer 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google_pubsub_enhancer.rb +13 -1
- data/lib/google_pubsub_enhancer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a42402edc4e8d1145de6b1afcf02b7eee20b861d
|
4
|
+
data.tar.gz: 42050fe16783ad5f6a41dbbffd5d53bbafd19732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b7812cbf3721a2ccd2db48b7985a9f4469a608ba078ce8e98a8e5bff1e55cc117a8671d0e83204bc396fa56f66a14637c66e97eb9e5299527ea837e84e44c3d
|
7
|
+
data.tar.gz: 9cdecea24e52ffa9ad07da021011fbd1c5caa4281c260775a1dc6aed3dd95ffbac2ef74d8f8b9285929d0942f65b809873f20348187a0026a75d14358a3d9106
|
@@ -47,7 +47,19 @@ class GooglePubsubEnhancer
|
|
47
47
|
@logger.debug{"#{received_messages.length} messages received"}
|
48
48
|
env = {received_messages: received_messages, nacked_messages: []}
|
49
49
|
@stack.call(env)
|
50
|
-
|
50
|
+
acknowledge(subscription,env)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def acknowledge(subscription,env)
|
55
|
+
acked_messages = env[:received_messages] - env[:nacked_messages]
|
56
|
+
begin
|
57
|
+
subscription.acknowledge(acked_messages)
|
58
|
+
rescue
|
59
|
+
acked_messages.each do |msg|
|
60
|
+
@logger.error "Retried acked message was: #{msg}"
|
61
|
+
end
|
62
|
+
retry
|
51
63
|
end
|
52
64
|
end
|
53
65
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-pubsub-enhancer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bejczib
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|