google-pubsub-enhancer 0.3.0 → 0.4.0
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 +5 -2
- 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: 403d0c89b7e9e6938283cdd7e955af7c94995bd8
|
4
|
+
data.tar.gz: 45a6176699295b29e249bad298726c9b60dbee2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5df9d3e5deb2539b1edbec674cfc06d12991ee525c40262a13e16825bc67c747be600ef4ff42b5c8ca168cc24b99603f6055ab3a2725c2c6d4793b99838aabd0
|
7
|
+
data.tar.gz: a3b1dff3d50b3fed07a069d457d00b72704394fb0ffa6fffa9345419aa93f877e48b6ee1938fea3b09ef874f75602eb80a93fb41f62a31cfb9b9eda6aa2cf801
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'json'
|
2
2
|
require 'middleware'
|
3
3
|
require 'google/cloud/pubsub'
|
4
|
+
require 'logger'
|
4
5
|
|
5
6
|
class GooglePubsubEnhancer
|
6
7
|
|
@@ -22,7 +23,8 @@ class GooglePubsubEnhancer
|
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
25
|
-
def initialize(
|
26
|
+
def initialize(logger: Logger.new(STDOUT),&block)
|
27
|
+
@logger = logger
|
26
28
|
@stack = ::Middleware::Builder.new(&block).__send__(:to_app)
|
27
29
|
end
|
28
30
|
|
@@ -30,7 +32,8 @@ class GooglePubsubEnhancer
|
|
30
32
|
configurated_options = configurate_options(opts)
|
31
33
|
subscription = create_subscription(subscription_short_name)
|
32
34
|
work(subscription, configurated_options)
|
33
|
-
rescue
|
35
|
+
rescue => ex
|
36
|
+
@logger.error "Retry: #{ex} "
|
34
37
|
retry
|
35
38
|
end
|
36
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-pubsub-enhancer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bejczib
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|