embulk-output-mailchimp 0.3.14 → 0.3.15

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: f89e9a5a69ae081a887e26d19c1a57695d265516
4
- data.tar.gz: b3c53d62e62a9127520163a38b053a12b4be50f3
3
+ metadata.gz: 464eeb7f786c9890be8adf21b84dbe1cc6ca442e
4
+ data.tar.gz: 0b812c416f3900910b9d1772aebdd56307fa737c
5
5
  SHA512:
6
- metadata.gz: d27ebd29fa3ad09b9c942ef2b2276db918f7ab38c2ff8fb819ed4cbfe7ecbea3e4bd25c1926cef43ed317c2d431c030916f015f8c8aacd24f6a125360a8f0326
7
- data.tar.gz: 376d7dadd0bec805f68d891930d0c1ebb60d618bbeb55519e90b80e92535826aa7e278b7c40d3d115c22a225aa56aed0ef46fff65ad1a01dae5d7022b57e1f6a
6
+ metadata.gz: ec68fb3cb297f16724edf22975801f9b7928319983deb13b925c4670d231f3ab664a4f49ffbab74bf088cf87c2483da6ea5b1838865e4711dee8c5ab32f6c2b9
7
+ data.tar.gz: 3b310edb9b4a7bc732b17bb17f5ad3f6097c748d73ee3c6a7693190e1f6764987dbeae81daf0db2d3ba426a4ee9325b1a2968944244357fdfa070b7b36229db3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.3.15 - 2017-07-26
2
+ - Add checking exception to retry [#30](https://github.com/treasure-data/embulk-output-mailchimp/pull/30)
3
+
1
4
  ## 0.3.14 - 2017-06-26
2
5
  - Make clear the log message and renamed class `MailChimpClient` [#29](https://github.com/treasure-data/embulk-output-mailchimp/pull/29)
3
6
 
data/build.gradle CHANGED
@@ -18,7 +18,7 @@ configurations {
18
18
  provided
19
19
  }
20
20
 
21
- version = "0.3.14"
21
+ version = "0.3.15"
22
22
 
23
23
  sourceCompatibility = 1.7
24
24
  targetCompatibility = 1.7
@@ -21,6 +21,8 @@ import org.embulk.util.retryhelper.jetty92.StringJetty92ResponseEntityReader;
21
21
  import org.slf4j.Logger;
22
22
 
23
23
  import java.io.IOException;
24
+ import java.util.concurrent.ExecutionException;
25
+ import java.util.concurrent.TimeoutException;
24
26
 
25
27
  /**
26
28
  * Created by thangnc on 4/14/17.
@@ -86,6 +88,17 @@ public class MailChimpHttpClient
86
88
 
87
89
  return status == 429 || status / 100 != 4;
88
90
  }
91
+
92
+ @Override
93
+ protected boolean isExceptionToRetry(Exception exception)
94
+ {
95
+ // This check is to make sure the exception is retryable, e.g: server not found, internal server error...
96
+ if (exception instanceof ConfigException || exception instanceof ExecutionException) {
97
+ return toRetry((Exception) exception.getCause());
98
+ }
99
+
100
+ return exception instanceof TimeoutException || super.isExceptionToRetry(exception);
101
+ }
89
102
  });
90
103
 
91
104
  return responseBody != null && !responseBody.isEmpty() ? parseJson(responseBody) : MissingNode.getInstance();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-output-mailchimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.14
4
+ version: 0.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thang Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-26 00:00:00.000000000 Z
11
+ date: 2017-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -89,7 +89,7 @@ files:
89
89
  - test/override_assert_raise.rb
90
90
  - test/run-test.rb
91
91
  - classpath/embulk-base-restclient-0.5.3.jar
92
- - classpath/embulk-output-mailchimp-0.3.14.jar
92
+ - classpath/embulk-output-mailchimp-0.3.15.jar
93
93
  - classpath/embulk-util-retryhelper-jetty92-0.5.3.jar
94
94
  - classpath/jetty-client-9.2.14.v20151106.jar
95
95
  - classpath/jetty-http-9.2.14.v20151106.jar