embulk-output-mailchimp 0.3.17 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/build.gradle +1 -1
- data/classpath/{embulk-output-mailchimp-0.3.17.jar → embulk-output-mailchimp-0.3.18.jar} +0 -0
- data/src/main/java/org/embulk/output/mailchimp/MailChimpHttpClient.java +4 -2
- data/src/main/java/org/embulk/output/mailchimp/MailChimpOutputPluginDelegate.java +4 -0
- data/src/main/java/org/embulk/output/mailchimp/MailChimpRecordBuffer.java +1 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d40d14e9983581d16ab09fb8c909b443eb25373
|
4
|
+
data.tar.gz: ed754d0a34cae59e5d0e6e36012a44bcac293551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 274b98c648edc2175e9551996e77a136dbe046dd38efa410deb94adb3c308a05a8c5ac8e0cab0c7e6f4d24771798f1ad6a51270c69108b85f6c28321e37edf4b
|
7
|
+
data.tar.gz: 78652eeea2f7b95488bf6fbff24b986af8dbe2ed8a3d4faf8fcf6e42401b7bdbe24eab80738de4e5e8071bad47d3df196d150c421747668bcefb311a4025028a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 0.3.18 - 2017-09-19
|
2
|
+
- Fixed error parsing MailChimp API response JSON when push the large data [#34](https://github.com/treasure-data/embulk-output-mailchimp/pull/34)
|
3
|
+
|
1
4
|
## 0.3.17 - 2017-09-14
|
2
5
|
|
3
6
|
- Support language_column option [#32](https://github.com/treasure-data/embulk-output-mailchimp/pull/32) Thanks @gillax
|
data/build.gradle
CHANGED
Binary file
|
@@ -1,6 +1,8 @@
|
|
1
1
|
package org.embulk.output.mailchimp;
|
2
2
|
|
3
3
|
import com.fasterxml.jackson.core.Base64Variants;
|
4
|
+
import com.fasterxml.jackson.core.JsonParser;
|
5
|
+
import com.fasterxml.jackson.databind.DeserializationFeature;
|
4
6
|
import com.fasterxml.jackson.databind.JsonNode;
|
5
7
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
6
8
|
import com.fasterxml.jackson.databind.node.MissingNode;
|
@@ -31,8 +33,8 @@ public class MailChimpHttpClient
|
|
31
33
|
{
|
32
34
|
private static final Logger LOG = Exec.getLogger(MailChimpHttpClient.class);
|
33
35
|
private final ObjectMapper jsonMapper = new ObjectMapper()
|
34
|
-
.configure(
|
35
|
-
.configure(
|
36
|
+
.configure(JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, false)
|
37
|
+
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
36
38
|
|
37
39
|
/**
|
38
40
|
* Instantiates a new Mailchimp http client.
|
@@ -103,6 +103,10 @@ public class MailChimpOutputPluginDelegate
|
|
103
103
|
@Config("language_column")
|
104
104
|
@ConfigDefault("null")
|
105
105
|
Optional<String> getLanguageColumn();
|
106
|
+
|
107
|
+
@Config("max_records_per_request")
|
108
|
+
@ConfigDefault("500")
|
109
|
+
int getMaxRecordsPerRequest();
|
106
110
|
}
|
107
111
|
|
108
112
|
/**
|
@@ -46,7 +46,6 @@ public class MailChimpRecordBuffer
|
|
46
46
|
extends RecordBuffer
|
47
47
|
{
|
48
48
|
private static final Logger LOG = Exec.getLogger(MailChimpRecordBuffer.class);
|
49
|
-
private static final int MAX_RECORD_PER_BATCH_REQUEST = 500;
|
50
49
|
private final MailChimpOutputPluginDelegate.PluginTask task;
|
51
50
|
private final MailChimpClient mailChimpClient;
|
52
51
|
private final ObjectMapper mapper;
|
@@ -88,7 +87,7 @@ public class MailChimpRecordBuffer
|
|
88
87
|
totalCount++;
|
89
88
|
|
90
89
|
records.add(record);
|
91
|
-
if (requestCount >=
|
90
|
+
if (requestCount >= task.getMaxRecordsPerRequest()) {
|
92
91
|
ObjectNode subcribers = processSubcribers(records, task);
|
93
92
|
ReportResponse reportResponse = mailChimpClient.push(subcribers, task);
|
94
93
|
|
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.
|
4
|
+
version: 0.3.18
|
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-09-
|
11
|
+
date: 2017-09-19 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.
|
92
|
+
- classpath/embulk-output-mailchimp-0.3.18.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
|