wcc-media-client 0.4.5 → 0.4.6

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: 28414c243c14857cb504d38c127eee4e3a596f0d
4
- data.tar.gz: 41e864e0cca71014d3e433ee6dd2ee8334db2f30
3
+ metadata.gz: fb0b493f457c62c034ddaeb8f6e66298dfed6c4d
4
+ data.tar.gz: 370a4baa11f87bd116bb755cdfb1945e6c68aba8
5
5
  SHA512:
6
- metadata.gz: 8911b1a1f26232c0215a89bab5c53cd52f39ea1531dcfd58d6ba20f7fce5a55a3e379f6feaf62db4882f02f4ee36e51b97e6535fbbb0ac9cc0f688bce6aea89b
7
- data.tar.gz: 7729809b264cc667a23ac57bbc2eabd0eb9083a71326e8ffcaa9c109db461efa5a05453d6f7cdaa7907240404ff16b6201057ff5b3d2684e1744b923fe5fb161
6
+ metadata.gz: 375233cb65ef9804a752ec9527abde99485a87f582c1519b2d5af0a174a0ee18601f5529ffc40a51cb8cc4124be4121c310dbb6182bbbcb375a2be923f487b40
7
+ data.tar.gz: 913519f1b40a4b881a5ef990ef4a9886dc5365005bb3ace4444bf0f00f08764a690761bdca19540e7902457b430c3cd22646ef2888d788d237b77025f6dc5714
@@ -76,6 +76,22 @@ class WCC::Media::Engine < ::Rails::Engine
76
76
 
77
77
  def perform
78
78
  Toot::RegistersSubscriptions.call
79
+ rescue WCC::Data::Mapper::ServiceUnavailable => e
80
+ _handle_error(e)
81
+ rescue Faraday::ConnectionFailed => e
82
+ _handle_error(e)
83
+ rescue Faraday::TimeoutError => e
84
+ _handle_error(e)
85
+ rescue Toot::RegisterSubscriptionFailure => e
86
+ raise unless e.status == 503
87
+
88
+ _handle_error(e)
89
+ end
90
+
91
+ private
92
+
93
+ def _handle_error(err)
94
+ logger.error "Server is down (will not retry): #{err.class} #{err}"
79
95
  end
80
96
  end
81
97
  end
@@ -1,5 +1,5 @@
1
1
  module WCC
2
2
  module Media
3
- VERSION = '0.4.5'.freeze
3
+ VERSION = '0.4.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wcc-media-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Watermark Dev