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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28ebeca7b05cdbf310567000889aef3948ef00c9
|
4
|
+
data.tar.gz: c93f40a50ed276e685240d4a7396bebaa0350e0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
|
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.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-
|
12
|
+
date: 2017-03-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|