gh-archive 0.10 → 0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gh-archive.rb +19 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 652cb53430d2e6a230d8f11465b81685f2e92107868345566d16b07d4c4231ed
|
4
|
+
data.tar.gz: abaec255c079e5a959fd51f7b1e7ca15d72c21eaaeac98d34d13309ec91eedeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 829b1d53a7b72f4ea83712e8a95ba059e48dff7c982e811d30d27018e45e1b7010ace2a4a3f2641318a598e765a6d2c6138b319f9d67dd2604617dc2785175be
|
7
|
+
data.tar.gz: fd85da1c6630e8b534fb34fc9b5a08fcda55e3d2606ca393157134b6d85da2a9a7f92bc87ae31369441da1799cfd2178f0af9703ca997d10296c3f9a5ab1e4f9
|
data/lib/gh-archive.rb
CHANGED
@@ -137,6 +137,9 @@ class GHAProvider
|
|
137
137
|
|
138
138
|
self.each_time(from, to) do |current_time|
|
139
139
|
events = []
|
140
|
+
|
141
|
+
update_checkpoint(current_time)
|
142
|
+
|
140
143
|
begin
|
141
144
|
events = self.get(current_time)
|
142
145
|
rescue GHAException => e
|
@@ -148,8 +151,6 @@ class GHAProvider
|
|
148
151
|
next
|
149
152
|
end
|
150
153
|
|
151
|
-
update_checkpoint(current_time)
|
152
|
-
|
153
154
|
events.each do |event|
|
154
155
|
skip = false
|
155
156
|
@includes.each do |key, value|
|
@@ -187,13 +188,25 @@ class OnlineGHAProvider < GHAProvider
|
|
187
188
|
def initialize(max_retries = 3, proactive = false, proactive_pool_size = 10)
|
188
189
|
super()
|
189
190
|
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
@pool = Thread.pool(proactive_pool_size)
|
191
|
+
self.max_retries(max_retries)
|
192
|
+
self.proactive(proactive_pool_size) if proactive
|
193
|
+
|
194
194
|
@cache = Cache.new
|
195
195
|
end
|
196
196
|
|
197
|
+
def max_retries(n)
|
198
|
+
@max_retries = n
|
199
|
+
|
200
|
+
return self
|
201
|
+
end
|
202
|
+
|
203
|
+
def proactive(pool_size = 10)
|
204
|
+
@proactive = true
|
205
|
+
@pool = Thread.pool(pool_size)
|
206
|
+
|
207
|
+
return self
|
208
|
+
end
|
209
|
+
|
197
210
|
def get(current_time)
|
198
211
|
@max_retries.times do
|
199
212
|
begin
|