embulk-output-mailchimp 0.3.17 → 0.3.18

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: 97a4628578804d6dc3c6392283d4501c40dc6fe6
4
- data.tar.gz: 46966dc57e5751cf8481ebcd0aae83a34b56c89d
3
+ metadata.gz: 3d40d14e9983581d16ab09fb8c909b443eb25373
4
+ data.tar.gz: ed754d0a34cae59e5d0e6e36012a44bcac293551
5
5
  SHA512:
6
- metadata.gz: cad46f57351a35a07cffa71ebef867118f2717ef9df312acbed9def2724bc1109fdcbec859e676f8ad834255136abb135175fd83e52097668264e8f0022cd98c
7
- data.tar.gz: eb0c3ddbf71bbf680a6b07b20746ac1c03940e00e1b14046252312f28b0bb5c4cd33a0dcfff814278a94986703584f008d813033ec525f7e5bb1423a7925579a
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
@@ -18,7 +18,7 @@ configurations {
18
18
  provided
19
19
  }
20
20
 
21
- version = "0.3.17"
21
+ version = "0.3.18"
22
22
 
23
23
  sourceCompatibility = 1.7
24
24
  targetCompatibility = 1.7
@@ -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(com.fasterxml.jackson.core.JsonParser.Feature.ALLOW_UNQUOTED_CONTROL_CHARS, false)
35
- .configure(com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
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 >= MAX_RECORD_PER_BATCH_REQUEST) {
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.17
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-14 00:00:00.000000000 Z
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.17.jar
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