embulk-input-facebook_ads_insights 0.1.3 → 0.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 606a76b2a27dc98a9e07eacf7dd2c992c328eba0
|
4
|
+
data.tar.gz: acdf8402bfd404a55f59684e675b9e2ef95ad41f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70875282b4fb53bfc43e6c2dfdd5735171dbae30d6beadba8e09c878182635856a56d90644248c710e40657fb5c5fed138eb5dea563b65ceaa81ada49e1ce4f8
|
7
|
+
data.tar.gz: 343161efcb979f9abc5570c9cbb0a79b360edcea98b6bc5ef858938083a24fe8b2ce1b1f4560da959eea594d2ddb03cbcf5a2341d529ce4f3028daf7017ec4c0
|
data/build.gradle
CHANGED
@@ -18,6 +18,7 @@ import org.slf4j.LoggerFactory;
|
|
18
18
|
|
19
19
|
import java.util.ArrayList;
|
20
20
|
import java.util.List;
|
21
|
+
import java.util.Objects;
|
21
22
|
import java.util.stream.Collectors;
|
22
23
|
|
23
24
|
public class Client
|
@@ -57,7 +58,23 @@ public class Client
|
|
57
58
|
while (adReportRun.fetch().getFieldAsyncPercentCompletion() != 100) {
|
58
59
|
Thread.sleep(ASYNC_SLEEP_TIME);
|
59
60
|
}
|
60
|
-
|
61
|
+
// extra waiting
|
62
|
+
int retryCount = 0;
|
63
|
+
boolean succeeded = false;
|
64
|
+
APINodeList<AdsInsights> adsInsights = null;
|
65
|
+
while (retryCount < pluginTask.getMaxWeightSeconds() && !succeeded) {
|
66
|
+
try {
|
67
|
+
Thread.sleep(1000);
|
68
|
+
adsInsights = adReportRun.getInsights().execute();
|
69
|
+
succeeded = true;
|
70
|
+
}
|
71
|
+
catch (APIException e) {
|
72
|
+
retryCount++;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
if (Objects.isNull(adsInsights)) {
|
76
|
+
throw new APIException();
|
77
|
+
}
|
61
78
|
return isPaginationValid ? fetchAllPage(adsInsights) : adsInsights;
|
62
79
|
}
|
63
80
|
|
@@ -81,4 +81,8 @@ public interface PluginTask extends Task
|
|
81
81
|
@Config("use_account_attribution_setting")
|
82
82
|
@ConfigDefault("null")
|
83
83
|
public Optional<Boolean> getUseAccountAttributionSetting();
|
84
|
+
|
85
|
+
@Config("max_wait_seconds")
|
86
|
+
@ConfigDefault("60")
|
87
|
+
public Integer getMaxWeightSeconds();
|
84
88
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embulk-input-facebook_ads_insights
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- naotaka nakane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,7 +50,7 @@ files:
|
|
50
50
|
- README.md
|
51
51
|
- build.gradle
|
52
52
|
- classpath/annotations-13.0.jar
|
53
|
-
- classpath/embulk-input-facebook_ads_insights-0.1.
|
53
|
+
- classpath/embulk-input-facebook_ads_insights-0.1.4.jar
|
54
54
|
- classpath/facebook-java-business-sdk-4.0.5.jar
|
55
55
|
- classpath/gson-2.5.jar
|
56
56
|
- classpath/guava-20.0.jar
|