embulk-input-facebook_ads_insights 0.1.10 → 0.1.11

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: e15001bc050404e05fc3b7e722b04c0a5482d99e
4
- data.tar.gz: f7ab80fcb6b69af1af7c4b1d89d89962bce2aabb
3
+ metadata.gz: 79ad7271aa1d3f1049ff02767fa72185fa5cdefd
4
+ data.tar.gz: 2033ec87f0bde97e4d2af1f9acf416e43a189c58
5
5
  SHA512:
6
- metadata.gz: 1ec4d35fec9a2004948a407fa3b26265b3519167be8fd03306c74ace9ed617cb13d969ace589d291aa9dba923661a94db24fba6b18a051970f8ceffd7ccd58a6
7
- data.tar.gz: 336ade308d51f06878cbd228ba39a1de3c85fc65fc98c23de86ccd8a49c984d633d73e9a09bf81209ca711586cb2f30635792e00ba30f2f4070be7fce4f0ee17
6
+ metadata.gz: 69b5fa024f8c0f676c0263a206bd372c4b6effcb79dc6f643221720d7680685a0a3871f9841a7170702831d688c32d1658cd40e3e3cca898ae1759457878e086
7
+ data.tar.gz: e68abcef4d926d532174971aa1465d1f9b5fd162d4c13fb3ad9dd8b5891db5f79aba5feabda3df741aa4071e80233c90ca82eef68f7a311d9b59b64fda314bb5
data/build.gradle CHANGED
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.1.10"
16
+ version = "0.1.11"
17
17
 
18
18
  sourceCompatibility = 1.8
19
19
  targetCompatibility = 1.8
@@ -24,7 +24,7 @@ import java.util.stream.Collectors;
24
24
  public class Client
25
25
  {
26
26
  private final Logger logger = LoggerFactory.getLogger(Client.class);
27
- private static final int ASYNC_SLEEP_TIME = 30000;
27
+ private static final int ASYNC_SLEEP_TIME = 3000;
28
28
  private static final int ASYNC_SLEEP_TIME_LIMIT = 900_000;
29
29
 
30
30
  private final PluginTask pluginTask;
@@ -75,7 +75,7 @@ public class Client
75
75
  jobStatus = "failed";
76
76
  throw new RuntimeException("async was aborted because the AsyncStatus is \"Job Failed\"");
77
77
  }
78
- if (adReportRun.getFieldAsyncStatus().equals("Job Not Started") && elapsedTime >= ASYNC_SLEEP_TIME_LIMIT) {
78
+ if (elapsedTime >= ASYNC_SLEEP_TIME_LIMIT) {
79
79
  jobStatus = "aborted";
80
80
  throw new RuntimeException("async was aborted because the number of retries exceeded the limit");
81
81
  }
@@ -83,9 +83,10 @@ public class Client
83
83
  asyncCompleted = true;
84
84
  }
85
85
  catch (RuntimeException e) {
86
- if (jobStatus != "failed"){
87
- throw new APIException(e);
86
+ if (jobStatus.equals("failed")) {
87
+ continue;
88
88
  }
89
+ throw new APIException(e);
89
90
  }
90
91
  }
91
92
  if (adReportRun == null || adReportRun.getFieldAsyncPercentCompletion() != 100) {
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.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - naotaka nakane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-17 00:00:00.000000000 Z
11
+ date: 2021-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ files:
52
52
  - classpath/annotations-13.0.jar
53
53
  - classpath/byte-buddy-1.10.13.jar
54
54
  - classpath/byte-buddy-agent-1.10.13.jar
55
- - classpath/embulk-input-facebook_ads_insights-0.1.10.jar
55
+ - classpath/embulk-input-facebook_ads_insights-0.1.11.jar
56
56
  - classpath/facebook-java-business-sdk-10.0.0.jar
57
57
  - classpath/gson-2.5.jar
58
58
  - classpath/guava-20.0.jar