gitlab-elasticsearch-git 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/gitlab-elasticsearch-git.gemspec +1 -1
- data/lib/elasticsearch/git/repository.rb +1 -19
- data/lib/elasticsearch/git/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 124cbbe73d9be0107bf261ec04b544f5e424a491
|
4
|
+
data.tar.gz: 5fba4f6f0893ac7b0947865d48a519dd3e38edf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfd5d246d4bd85f7f1aee7b30e0da5aa3a12abb5ff845d047c9158e3128af4464fa7cdf2d232df2907134154fd28b19e8f6cf3735f54e5d7f7efc33efbb12a4a
|
7
|
+
data.tar.gz: 73bd68f1e6035115f9992a715ecb15f46eddd145ee2a97a1a07d10e79d770cf4f1e63ed439f12a0df3178b8f0cef901746d9587cffb51b5ccf85e43c3a78d97d
|
data/CHANGELOG
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'elasticsearch-model', '~> 1.
|
21
|
+
spec.add_runtime_dependency 'elasticsearch-model', '~> 0.1.8'
|
22
22
|
spec.add_runtime_dependency 'elasticsearch-api', '~> 1.0'
|
23
23
|
spec.add_runtime_dependency 'rugged', '~> 0.23.3'
|
24
24
|
spec.add_runtime_dependency 'charlock_holmes', '~> 0.7'
|
@@ -152,16 +152,6 @@ module Elasticsearch
|
|
152
152
|
out, err, status = Open3.capture3("git log #{range} --format=\"%H\"", chdir: repository_for_indexing.path)
|
153
153
|
|
154
154
|
if status.success? && err.blank?
|
155
|
-
queue = Queue.new
|
156
|
-
|
157
|
-
workers = (0...3).map do
|
158
|
-
Thread.new do
|
159
|
-
while bulk_operations = queue.pop
|
160
|
-
perform_bulk bulk_operations
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
164
|
-
|
165
155
|
#TODO use rugged walker!!!
|
166
156
|
commit_oids = out.split("\n")
|
167
157
|
|
@@ -170,16 +160,8 @@ module Elasticsearch
|
|
170
160
|
index_commit(repository_for_indexing.lookup(commit))
|
171
161
|
end
|
172
162
|
|
173
|
-
|
174
|
-
queue << bulk_operations
|
163
|
+
perform_bulk bulk_operations
|
175
164
|
end
|
176
|
-
|
177
|
-
while queue.num_waiting < workers.count
|
178
|
-
sleep 0.1
|
179
|
-
end
|
180
|
-
|
181
|
-
# Kill off each thread now that they're idle and exit
|
182
|
-
workers.each(&:exit)
|
183
165
|
end
|
184
166
|
end
|
185
167
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab-elasticsearch-git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Kumanyaev
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 0.1.8
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
28
|
+
version: 0.1.8
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: elasticsearch-api
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|