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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28ebeca7b05cdbf310567000889aef3948ef00c9
4
- data.tar.gz: c93f40a50ed276e685240d4a7396bebaa0350e0a
3
+ metadata.gz: a42402edc4e8d1145de6b1afcf02b7eee20b861d
4
+ data.tar.gz: 42050fe16783ad5f6a41dbbffd5d53bbafd19732
5
5
  SHA512:
6
- metadata.gz: 5220a1b22e5c2c52c088be3c709e6fabe280a659a5bc4cf141ce7402495ca2517b57a097fec0e296412ce4d71f3c8ed848433b7649f1368d84b7fb728af75c59
7
- data.tar.gz: a33e50c90ed38bb756b20b2e7803650a30c7338bf1b7de1d8f27d6a442511ec5d9e05e6492b66ac38ead73729be20b1629e55320e91a26d1dc67d7f10ea012bc
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
- subscription.acknowledge(env[:received_messages] - env[:nacked_messages])
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
 
@@ -1,3 +1,3 @@
1
1
  class GooglePubsubEnhancer
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
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
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-03-24 00:00:00.000000000 Z
12
+ date: 2017-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler