embulk-input-facebook_ads_insights 0.1.7 → 0.1.8

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: 07a75cf04063a498b5388595c28563db0ae6f766
4
- data.tar.gz: e7bf8a70fdf450a6f2c9f53aac1f8e4a96e27a8a
3
+ metadata.gz: ded968a200fd475e9d9da39be05631fca7f37586
4
+ data.tar.gz: 23229851faaafed837dd3c79cd2913ccf2d76737
5
5
  SHA512:
6
- metadata.gz: 1894b62794582b46dd920b7a0b5e969918c4f38d16517f7847e70cd45086db55d41df91985fef18b3bbce2664699dc9a97e0d70d55f4e701a1d57ae33a9e3955
7
- data.tar.gz: 83acf94ddd0b9222dfa5ded9a69b7350d78841ed3ff2226c1021d5a288f4c26b2f4a27f75b5ba78c917d85fb17071605133bffe648ecd642fcec68f368db442c
6
+ metadata.gz: 9ffb9c3515a072d50cbc50c0d4e9768293170890f008669901d2e0d736325146e611511f493c8868e30976dde0d78328f6a5d046fb56482fc3d69e8a2a5ddb0c
7
+ data.tar.gz: b03289412d1321415ad83e9fa76437456ce42c2cfae2afb38159021452096ededa127c3f82fcd31e47226487c4ce563038666abee396c9ed8b573c928a1ee85b
@@ -13,7 +13,7 @@ configurations {
13
13
  provided
14
14
  }
15
15
 
16
- version = "0.1.7"
16
+ version = "0.1.8"
17
17
 
18
18
  sourceCompatibility = 1.8
19
19
  targetCompatibility = 1.8
@@ -56,9 +56,16 @@ public class Client
56
56
  default: throw new IllegalArgumentException();
57
57
  }
58
58
  logger.info(adReportRun.getRawResponse());
59
+ int asyncLoopCount = 0;
59
60
  while (adReportRun.fetch().getFieldAsyncPercentCompletion() != 100) {
60
61
  logger.info(adReportRun.getRawResponse());
61
62
  Thread.sleep(ASYNC_SLEEP_TIME);
63
+ if (adReportRun.getFieldAsyncStatus().equals("Job Skipped")) {
64
+ throw new RuntimeException("async was aborted because the AsyncStatus is \"Job Skipped\"");
65
+ }
66
+ if (++asyncLoopCount >= 300) {
67
+ throw new RuntimeException("async was aborted because the number of retries exceeded the limit");
68
+ }
62
69
  }
63
70
  logger.info(adReportRun.getRawResponse());
64
71
  // extra waiting
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - naotaka nakane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-06 00:00:00.000000000 Z
11
+ date: 2020-12-23 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.7.jar
53
+ - classpath/embulk-input-facebook_ads_insights-0.1.8.jar
54
54
  - classpath/facebook-java-business-sdk-8.0.2.jar
55
55
  - classpath/gson-2.5.jar
56
56
  - classpath/guava-20.0.jar