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 +4 -4
- data/lib/wcc/media/engine.rb +16 -0
- data/lib/wcc/media/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb0b493f457c62c034ddaeb8f6e66298dfed6c4d
|
4
|
+
data.tar.gz: 370a4baa11f87bd116bb755cdfb1945e6c68aba8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375233cb65ef9804a752ec9527abde99485a87f582c1519b2d5af0a174a0ee18601f5529ffc40a51cb8cc4124be4121c310dbb6182bbbcb375a2be923f487b40
|
7
|
+
data.tar.gz: 913519f1b40a4b881a5ef990ef4a9886dc5365005bb3ace4444bf0f00f08764a690761bdca19540e7902457b430c3cd22646ef2888d788d237b77025f6dc5714
|
data/lib/wcc/media/engine.rb
CHANGED
@@ -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
|
data/lib/wcc/media/version.rb
CHANGED