google-pubsub-enhancer 0.5.3 → 0.5.4

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: f79852f972a0a15dfc6c9beef70669a2bbd85ae2
4
- data.tar.gz: 830de88a7bf67d58426b12fecfc3ee8b4b56bed1
3
+ metadata.gz: 28ebeca7b05cdbf310567000889aef3948ef00c9
4
+ data.tar.gz: c93f40a50ed276e685240d4a7396bebaa0350e0a
5
5
  SHA512:
6
- metadata.gz: 9f723efe6450d522f65d73401c3345f9708caf5f664987afbb8253a1b08933bf3448bbcaedb41e690a03732b3ac8953f208bec18cb2eb9f77f31635bec7dcaf0
7
- data.tar.gz: 8f1573ce733a9a21aaf21de9c893b9fb877511cc304254a2276e129147de1b16f59235638f28088b68b8f9184f1cfd993911b8817f39d910153a9c871446a993
6
+ metadata.gz: 5220a1b22e5c2c52c088be3c709e6fabe280a659a5bc4cf141ce7402495ca2517b57a097fec0e296412ce4d71f3c8ed848433b7649f1368d84b7fb728af75c59
7
+ data.tar.gz: a33e50c90ed38bb756b20b2e7803650a30c7338bf1b7de1d8f27d6a442511ec5d9e05e6492b66ac38ead73729be20b1629e55320e91a26d1dc67d7f10ea012bc
@@ -10,15 +10,17 @@ class GooglePubsubEnhancer::Middleware::Publisher
10
10
  end
11
11
 
12
12
  def call(env)
13
- @logger.debug("#{env[@messages_key].length} messages published")
14
- @google_cloud_pubsub.publish(@full_topic_name) do |publisher|
15
- [*env[@messages_key]].each do |m|
16
- publisher.publish(m)
13
+ begin
14
+ @logger.debug("#{env[@messages_key].length} messages published")
15
+ @google_cloud_pubsub.publish(@full_topic_name) do |publisher|
16
+ [*env[@messages_key]].each do |m|
17
+ publisher.publish(m)
18
+ end
17
19
  end
20
+ rescue => ex
21
+ @logger.error("Retry publisher: #{ex}")
22
+ retry
18
23
  end
19
- rescue => ex
20
- @logger.error("Retry publisher: #{ex}")
21
- retry
22
24
  @app.call(env)
23
25
  end
24
26
 
@@ -1,3 +1,3 @@
1
1
  class GooglePubsubEnhancer
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
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.3
4
+ version: 0.5.4
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-16 00:00:00.000000000 Z
12
+ date: 2017-03-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler