embulk-input-travis 0.5.0 → 0.6.0

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
  SHA256:
3
- metadata.gz: eff7ee681377fc095150a3684cc506ba5489cc0bc333f5a14aec184e928c1ad9
4
- data.tar.gz: d60a64cd2870adb29a048194ec939da056a7b377a561dc5327ae54356170b3e3
3
+ metadata.gz: 01f55cd1db02c2550593ed985180e6d3114e543f6f0baaa277248b74c85e7e10
4
+ data.tar.gz: 79a66eb49c256aac3f7d185b059f4537f7064d9d99df8717c013e45cffc4192a
5
5
  SHA512:
6
- metadata.gz: 142796ad41bbd0cf0b6033da8d760166f1042a3fe962b64799ff9f7a373c176a814928b30e75f7ec4181a49f1c638bf1a4c8205872a2a42de0072b08f23be7ec
7
- data.tar.gz: 1129b88bfa37863099fdf5b183cb4ea4d7cb33c256b3f3c2e29f23af3c7aef17dcf2bdf434f7a03622d0ac427ddb780c307297e79358195dd2453bcdb27334ae
6
+ metadata.gz: 5567bd22df5b9ad787aa23da8c3565f88aab8c727b0bd3d80c74faaebb3fd7d04bde91ec44617a2992b7c4690cb1ea8ce309e09a5a1df055543d88ef0463eccf
7
+ data.tar.gz: b0e0e92edef1a742d053a6c178e4528b98c940ae0659b1c54aa87813f71b5d45bf0dff9cee5bf7a15234e4e3566305ea94ddfd813d610250711c007730cc330c
@@ -1,3 +1,8 @@
1
+ # 0.6.0
2
+
3
+ - Add commit_data
4
+ - Flush on each 5 jobs
5
+
1
6
  # 0.5.0
2
7
 
3
8
  - Clear cache on each job
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "embulk-input-travis"
4
- spec.version = "0.5.0"
4
+ spec.version = "0.6.0"
5
5
  spec.authors = [""]
6
6
  spec.summary = "Travis input plugin for Embulk"
7
7
  spec.description = "Loads records from Travis."
@@ -23,7 +23,8 @@ module Embulk
23
23
  Column.new(2, "log", :string),
24
24
  Column.new(3, "started_at", :timestamp),
25
25
  Column.new(4, "build_number", :long),
26
- Column.new(5, "build_data", :string)
26
+ Column.new(5, "build_data", :string),
27
+ Column.new(6, "commit_data", :string)
27
28
  ]
28
29
 
29
30
  resume(task, columns, 1, &control)
@@ -74,24 +75,32 @@ module Embulk
74
75
  next
75
76
  end
76
77
 
77
- build.job_ids.each do |job_id|
78
- with_retry do
79
- job = client.session.find_one(::Travis::Client::Job, job_id)
80
-
81
- Embulk.logger.info { "embulk-input-travis: Start job_id:[#{job.id}]" }
82
-
83
- page_builder.add([
84
- job.id,
85
- job.to_h.to_json,
86
- job.log.body,
87
- job.started_at,
88
- build.number.to_i,
89
- build.to_h.to_json
90
- ])
91
-
92
- repo.session.clear_cache!
78
+ build.job_ids.each_slice(5) do |job_ids|
79
+ job_ids.each do |job_id|
80
+ with_retry do
81
+ job = client.session.find_one(::Travis::Client::Job, job_id)
82
+
83
+ Embulk.logger.info { "embulk-input-travis: Start job_id:[#{job.id}]" }
84
+
85
+ page_builder.add([
86
+ job.id,
87
+ job.to_h.to_json,
88
+ job.log.body,
89
+ job.started_at,
90
+ build.number.to_i,
91
+ build.to_h.to_json,
92
+ build.commit.to_h.to_json
93
+ ])
94
+ end
93
95
  end
96
+
97
+ Embulk.logger.info { "embulk-input-travis: flush" }
98
+ page_builder.flush
99
+ repo.session.clear_cache!
94
100
  end
101
+
102
+ page_builder.flush
103
+ repo.session.clear_cache!
95
104
  end
96
105
 
97
106
  page_builder.finish
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-travis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-09 00:00:00.000000000 Z
11
+ date: 2019-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: travis