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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0d68888960869040e10aadf51b0d4b2cc624636
4
- data.tar.gz: 06040d4f23968fe94dc9f2f57cdc3f172c7fed42
3
+ metadata.gz: 403d0c89b7e9e6938283cdd7e955af7c94995bd8
4
+ data.tar.gz: 45a6176699295b29e249bad298726c9b60dbee2c
5
5
  SHA512:
6
- metadata.gz: c1d0e02a113ca4f975635a7e65fa13983daf586783547022ebdc2d6f737c16f5243b0433e2d26526c4b67cad6cb317fa81538b6d12eb6b477c8f499c3f845597
7
- data.tar.gz: bcb6be3867750466c3caaeb2c2a8985a3aac01a7b7da06905c67818dfe68ec376d917716674e2efd2061716aaa707160a034ffdf29b891dd9b73c58c5f087cca
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(&block)
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
 
@@ -1,3 +1,3 @@
1
1
  class GooglePubsubEnhancer
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.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-16 00:00:00.000000000 Z
11
+ date: 2017-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler