embulk-input-adebis 0.0.1.pre4 → 0.0.1.pre5
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3eca218a64d051ae548b314eed0c189ac300c182
|
|
4
|
+
data.tar.gz: 0fbb66355842cbb209ac04754a33537f199e443a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7960e41ad2837dae51a46b3eddae368ade31fb3b5c865761137faaaaf8705392b38c99f7b3a9d752501dfb20f66d18362113fa13f0e5658263934df0cae19b10
|
|
7
|
+
data.tar.gz: 14ee60705c8eec1b349a6459dcc59b3e21ad7d4e189d5218ffa1aa491e4cbcc4b87759fdc777e1ae4bac00c449d23a9d0007b3c44ce20ba90d009f05f955e01f
|
|
Binary file
|
|
@@ -96,8 +96,9 @@ public class Ad extends AbstractOperation {
|
|
|
96
96
|
*/
|
|
97
97
|
|
|
98
98
|
public void run(PageBuilder pageBuilder) {
|
|
99
|
-
long lastRecordId
|
|
99
|
+
long lastRecordId = 0;
|
|
100
100
|
long currentRecordId = 0;
|
|
101
|
+
long latestRecordId = 0;
|
|
101
102
|
|
|
102
103
|
Schema schema = pageBuilder.getSchema();
|
|
103
104
|
AdManagementService adManagementService;
|
|
@@ -127,6 +128,7 @@ public class Ad extends AbstractOperation {
|
|
|
127
128
|
if(getLastRecordId().isPresent()) {
|
|
128
129
|
lastRecordId = Long.parseLong(getLastRecordId().get());
|
|
129
130
|
}
|
|
131
|
+
latestRecordId = lastRecordId;
|
|
130
132
|
|
|
131
133
|
//if(lastRecordTime.isAfter(startDate.atStartOfDay())) {
|
|
132
134
|
// startDate = lastRecordTime.toLocalDate();
|
|
@@ -169,13 +171,18 @@ public class Ad extends AbstractOperation {
|
|
|
169
171
|
else break;
|
|
170
172
|
for (jp.ne.ebis.extreme.ws.entity.xsd.Ad record : results) {
|
|
171
173
|
Boolean isExcluded = false;
|
|
172
|
-
|
|
173
|
-
if ( ! record.isCreatedSpecified()) {
|
|
174
|
+
if ( ! record.isModifiedSpecified()) {
|
|
174
175
|
break;
|
|
175
176
|
}
|
|
177
|
+
currentRecordId = record.getModified();
|
|
178
|
+
// 前回処理時の最新更新時間を越えていなければ保存しない
|
|
176
179
|
if (lastRecordId >= currentRecordId) {
|
|
177
180
|
continue;
|
|
178
181
|
}
|
|
182
|
+
// 今回処理時の最新更新時間
|
|
183
|
+
if (latestRecordId <= currentRecordId) {
|
|
184
|
+
latestRecordId = currentRecordId;
|
|
185
|
+
}
|
|
179
186
|
for (Column c : schema.getColumns()) {
|
|
180
187
|
switch (c.getName()) {
|
|
181
188
|
case "adId":
|
|
@@ -300,7 +307,7 @@ public class Ad extends AbstractOperation {
|
|
|
300
307
|
}
|
|
301
308
|
|
|
302
309
|
setLastRecordTime(Optional.of(newestRecordTime.format(embulkDateTimeFormat)));
|
|
303
|
-
setLastRecordId(Optional.of(String.valueOf(
|
|
310
|
+
setLastRecordId(Optional.of(String.valueOf(latestRecordId)));
|
|
304
311
|
}
|
|
305
312
|
|
|
306
313
|
public Schema buildSchema() {
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: embulk-input-adebis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.1.
|
|
4
|
+
version: 0.0.1.pre5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takuya Tokuda
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-06-
|
|
11
|
+
date: 2019-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|